命令优化器
通过缓存解析结果,降低命令方块的性能影响。
工作原理
运行命令方块时,游戏每次执行都会解析命令文本。这会占用大量冗余的处理时间。如果将解析结果存储在内存中,则可以加快命令的执行速度。只有在命令被更改时,才需要重新进行解析。
预期的性能提升
根据你使用的命令方块数量不同,性能提升幅度也会有所差异。
你可以安全地预期命令方块对 TPS(每秒刻数)的影响至少能减少 10-20%。对于涉及方块操作的命令,其收益可能会比其他不密集的命令略小。
在创造模式服务器的实际使用测试中,显示性能损耗减少了约 30%(整体服务器繁忙时间减少了 3-4%)。
Command Optimiser
Reduces performance impact of command blocks by caching parsing results.
How it works
When running command blocks, the game parses the command text every time it is run. This takes up a lot of redundant processing time. Instead if the results of parsing are stored in memory we can speed up command execution. The command only needs to be parsed again when it is changed.
Expected performance improvements
Depending on the number of command blocks you use, the performance gains may vary.
You can safely expect that the TPS impact of command blocks will reduce by at least 10-20%. Gains will likely be smaller for commands that affect blocks than other, less intensive commands.
Testing with real-world command usage on a creative server showed a reduction of about 30% (overall 3-4% of server busy time).
评论 0
登录后参与评分
还没有评论,来抢沙发吧