mojira.dev
MC-257225

High allocation rate after starting the game (first world load)

High allocation rates are noticeable when opening a single player world for the first time after launching the game. Second runs do not have this issue.

Steps to reproduce:

  1. Open the game

  2. Load world

  3. High allocation rate for many seconds (annoying on old hardware?/battery saver mode)

  4. Quit world without closing the game

  5. Load world

  6. High allocation rate for a few seconds (not much of an issue)

  7. Quit world

It is pretty annoying as the CPU is highly utilized. It happened both in 22w44a generated worlds and converted 1.19 worlds. It happens on 1.19.2 as well.

It seems this is more noticeable when battery saver mode is on on macOS. Allocation rate was 000MB/s probably because it was on its first seconds, but I could see GC running a few times. This did not happen for a minute, but for 15 seconds. Still happens, as opening the world again afterwards takes way less time (3-4 seconds).

Not sure if this could be improved by moving somethings to the init phase of the game instead of leaving it to when the world is loading. It also happens when joining servers, thus it is probably related to the client side.

I investigated this issue. It may be related to building optimized DataFixer. Building an unoptimized DataFixer (like LazyDFU mod does) partially solves the issue. Allocation comes back to normal right after the log message "Datafixer optimizations took {} milliseconds" (which in my case, was 77 seconds, a huge computational cost). Maybe this isn't the only thing affecting it, because even with LazyDFU there's some higher CPU usage on first world open compared to the second world open.

Comments 3

Please check if this is still an issue for you in 1.19.4 or later.

It was! Thank you!! So happy to see this fixed

Thanks for the feedback. Resolving this as Cannot Reproduce then.

Rafael

(Unassigned)

Unconfirmed

(Unassigned)

1.19.2, 22w44a

Retrieved