-
Notifications
You must be signed in to change notification settings - Fork 66
Description
Feature Request
Configuration Option for Permanent Chunk Loading to Reduce I/O Pressure in Train Carts
Description
Hello, I've noticed that Train Carts has a very high time consumption on the CraftWorld.getChunkAt() event (24%), which may cause server lag. I suspect that CraftWorld.getChunkAt() might involve I/O operations, leading to high latency.
On my server, there is a long railway line, and the trains running on this line are set to force load chunks, and trains are automatically generated at regular intervals. I wonder if the frequent loading and unloading of chunks leads to intensive I/O operations, causing lag.
Therefore, I would like to know if Train Carts offers such a configuration: setting the chunks that trains frequently pass through to stay in memory permanently to reduce I/O pressure. Because I have sufficient memory space to do this.
If there is no such configuration option, I wonder if it could be considered to add such an option. This could significantly improve the performance of servers using the Train Carts railway system as their main gameplay, by keeping the chunks along the railway line in memory permanently, reducing the number of I/O operations.
Examples
For example, set a maximum number of permanent chunks and use the LFU (Least Frequently Used) algorithm to evict permanent chunks.