Concurrent Chunk Management Engine

Concurrent Chunk Management Engine

2M Downloads

MSPT spikes when entering chunks

wiktopt opened this issue ยท 4 comments

commented

Describe the bug
When you enter the next chunk / pass through the chunk border MSPT spikes.

To Reproduce

  1. Go to the next chunk

Expected behavior
Somewhat stable MSPT in nearby chunks.

Runtime info:

  • OS: Windows 11 24H2
  • Minecraft version: 1.21.4
  • Mod version: 0.3.2+alpha.0.22

Other mods
-Mod list: https://pastebin.com/mZMFfj6q

Checklist

  • I am using the official version of the mod.
  • I tried the latest development version but the issue persists.
  • I searched for similar open issues and could not find an existing bug report on this.

Additional context
I tested in which aspects Moonrise or c2me behaved better (the world was pre-generated) and noticed that when moving at high speed through the world (flying) they behaved similarly, but when I tried to move through the same nearby chunks only c2me behaved this way:
https://streamable.com/4ia26i
Moonrise for comparison:
https://streamable.com/bsgucs
Although both mods give the same average MSPT for Moonrise, it is more stable (has only slight deviation)

commented

Please provide logs.
Also remove vmp in this test as it makes C2ME chunk loading to be in square and doesn't affect Moonrise.

commented

Found the issue:
Moonrise delays chunk unloading by several seconds. This is not vanilla behavior. Moonrise is simply using tricks to hide the problem.
C2ME is constantly unloading and reloading chunks on the edge of the view distance to maintain vanilla behavior.

The problem can easily be seen with command blocks spamming chat.

The incorrect behavior with Moonrise without any other mods:
https://github.com/user-attachments/assets/3cacd474-7a51-4794-8bdc-ecd05e20c51d

The correct behavior with C2ME without any other mods:
https://github.com/user-attachments/assets/2e0f82df-3986-4d76-a8f9-5dfe7505ef02

Closing as wontfix.

commented

I want to highlight mspt's spikes. I know this happens due to unloading and reloading of chunks and it is vanilla behavior, but even on a vanilla system (without c2me) the spikes are not that bad. In the minecart situation (running in a circle between 4 chunks), the average mspt on c2me was 9 ms with spikes of around 33 ms, while on vanilla it averaged 7 ms with spikes of around 22 ms.

commented

I want to highlight mspt's spikes. I know this happens due to unloading and reloading of chunks and it is vanilla behavior, but even on a vanilla system (without c2me) the spikes are not that bad. In the minecart situation (running in a circle between 4 chunks), the average mspt on c2me was 9 ms with spikes of around 33 ms, while on vanilla it averaged 7 ms with spikes of around 22 ms.

C2ME load in chunks at the view distance border probably within one or few ticks, and thats where the spike comes.