GregTechCEu / GregTech

GregTech CE 1.12 fork continuing progression and development
GNU Lesser General Public License v3.0
223 stars 166 forks source link

Alfheim causing huge amount of ram consumption with TrackedDummyWorld #2465

Open MCTian-mi opened 2 weeks ago

MCTian-mi commented 2 weeks ago

GregTech CEu Version

v2.8.7

Modpack Used

No response

Addons Installed

No response

Environment

Singleplayer

New Worlds

Yes

Cross-Mod Interaction

Yes

Expected Behavior

Alfheim works fine together with ceu.

Actual Behavior

With both mods installed, the game's ram consumption increases rapidly during finishing up where ceu registers multiblock recipe for jei. In modpacks like Supersymmetry, this can lead to serious memory leaks (>4 GB).

Steps to Reproduce

1) Install ceu, run the game and check ram usage. 2) Install alfheim, start the game again and compare the ram usage with that when alfheim is not installed.

Additional Information

This is likely caused by 'TrackedDummyWorld' in ceu never unloads, while alfheim uses mixin to add its lighting engine, which uses Long array to save lighting infomations, into the world class, resulting in unnecessary ram usage.

note that I can't say this is a fault on ceu side, I had also created a issue on alfheim's repo. If it's alfheim to be blame, just close this.

ChenHaoYan1234 commented 2 weeks ago

I checked the heap usage with VisualVM and found that there are a large number of long arrays

ChenHaoYan1234 commented 2 weeks ago

and each array cost over 50MB memory