Multithreading

From Hazeron Wiki
Jump to navigation Jump to search

Hazeron eagerly uses as many threads as possible to perform multiple tasks simultaneously. The practical limit to the number of threads that can execute simultaneously equals the number of CPU cores in the computer.

An animated gold icon appears in the top right corner of the scene window whenever one or more worker threads are busy in the background.

Settings

Program settings tab has the Worker Threads slider at the top.

The Settings window, Program tab, offers a control for configuring Worker Threads.

Worker threads perform complex tasks, like building 3D models of terrain and spacecraft. This setting controls the number of worker threads permitted to operate simultaneously.

Each simultaneous worker thread uses a CPU core; either physical or logical. Worker threads share the CPU with the main GUI thread and the network communication threads. Other programs running on your computer share the same CPU cores.

A large number of worker threads helps terrain and spacecraft models appear promptly when needed. Too many worker threads compete for limited system resources, starve the GUI and network threads, cause jerky response to movement, and reduce frame rate.

The Auto setting uses the number of cores minus 2 when the number of cores exceeds 2. It uses one core when the number of cores is 2 or 1.

Changes to this setting take effect immediately. It is not necessary to restart the program.