Only have a single thread config
This means that CPU use will be a lot more consistent since all internal thread pools share a single thread count semaphore.
This commit is contained in:
+16
-18
@@ -26,33 +26,31 @@ import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfigGroup;
|
||||
* Distant Horizons' threading configuration.
|
||||
*
|
||||
* @author James Seibel
|
||||
* @version 2023-10-29
|
||||
* @version 2024-12-26
|
||||
* @since API 1.0.0
|
||||
*/
|
||||
public interface IDhApiMultiThreadingConfig extends IDhApiConfigGroup
|
||||
{
|
||||
|
||||
/**
|
||||
* Defines how many world generator threads are used to generate
|
||||
* terrain outside Minecraft's vanilla render distance. <br>
|
||||
* <br>
|
||||
* If the number of threads is less than 1 it will be treated as a percentage
|
||||
* representing how often the single thread will actively generate terrain.
|
||||
* Defines how many threads Distant Horizons
|
||||
* uses.
|
||||
*
|
||||
* @since API 4.0.0
|
||||
*/
|
||||
IDhApiConfigValue<Integer> worldGeneratorThreads();
|
||||
|
||||
/** Defines how many file handler threads are used. */
|
||||
IDhApiConfigValue<Integer> fileHandlerThreads();
|
||||
IDhApiConfigValue<Integer> threadCount();
|
||||
|
||||
/**
|
||||
* Defines how many threads are used
|
||||
* to build LODs. <br><br>
|
||||
*
|
||||
* This includes: <br>
|
||||
* - lighting <br>
|
||||
* - Chunk -> LOD conversion <br>
|
||||
* - Buffer generation <br>
|
||||
* Defines how many long Distant Horizons
|
||||
* threads will spend running vs sleeping.
|
||||
* This is helpful when reducing the CPU
|
||||
* load on low end CPUs.
|
||||
* 1.0 = 100% uptime
|
||||
* 0.5 = 50% uptime
|
||||
* 0.1 = 10% uptime
|
||||
*
|
||||
* @since API 4.0.0
|
||||
*/
|
||||
IDhApiConfigValue<Integer> lodBuilderThreads();
|
||||
IDhApiConfigValue<Double> threadRuntimeRatio();
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user