Immersive Petroleum

Immersive Petroleum

47M Downloads

[1.18.2] Lag spikes every 5 minutes on a pregenned world due to ImmersivePetroleum-SaveData.dat

jinkhya opened this issue ยท 21 comments

commented

Minecraft Version

1.18.2

Immersive Engineering Version

8.3.1-157

Immersive Petroleum Version

4.0.0-17

Current Behaviour

Hello,
After pregenning a world with a 10k radius I've noticed that the server was having a lag spike every 5minutes (starting about 10 minutes after the world was loaded) It looked like world save and after investigating I found out that the ImmersivePetroleum-SaveData.dat is 11.9MB (compared to 1.6KB in 1.16 modpack)

I tried opening that file with NBT Explorer and it takes 40 seconds to open it, and it uses 100% CPU upon expanding islands entries (there are 112730 islands entries). I had to force close it after a while as it was not going anywhere.

I then deleted that file, for testing purposes, and loaded the same world and the issue completely disappeared.

Thanks in advance,
Jin

Expected Behaviour

To not have the save spikes :)

Reproduction Steps

Kinda hard to give instructions as it'd take a lot of time.
Pregen a new world and observe the data file.

Debug Crash Log

https://gist.github.com/jinkhya/e24c615747bb28a7559b4ecb97bfc64f

Information for the reader.

  • Add a ๐Ÿ‘ to the bug report if you are also affected. This helps show the severity of this bug report and doesn't clutter the comments.
  • Add a comment if you have any insights or background information that isn't already part of the conversation.
commented

Quick question, could you send me that ImmersivePetroleum-SaveData.dat file? If you still have it that is.

commented

Sure thing ! Here you go :
ImmersivePetroleum-SaveData.zip

commented

Thank you!
Its a good benchmark to test the new system including the "old2new-converter"

commented

Fixed with 92373b5

commented

awesome ! ty for working on it so quickly :)

commented

Hello again,
Do you think I can remove the file for now, tell people not to play with immersive petroleum for now and when the mod updates, put the file back in ? (I believe you commit adds a way to convert the old files to the new system)
Thanks in advance,
Jin

commented

I'm talking about the dat file, not the jar btw :)

commented

Do you think I can remove the file for now.

Im not sure thats a good idea, then you'd also need to tell them to not go beyond what you've already generated. Otherwise IP will make a new file which you'd have to merge with the old somehow.

I believe you commit adds a way to convert the old files to the new system

Yeah i made sure that the new has a way to convert the old.

commented

Actualy, nevermind. Just made a release, so no need to keep'em waiting. :)

commented

Actualy, nevermind. Just made a release, so no need to keep'em waiting. :)

Oh that's truely awesome !!! thank you so much :D

commented

Hello again ! so I tried the update and it fixed the lag, the new system converted the old file. However I'm not sure it did what you wanted to, all the files are in data folder and not in a sub ipregion folder ^^ :
image

commented

https://gist.github.com/jinkhya/eeb344a84d509e6d6f242289663d08d7
I suppose that's what you're after, no error though

commented

it looks like it put the ImmersivePetroleum-ReservoirRegions in the name, instead of creating a folder to then have files with just "0_0.dat"

commented

so I tried the update and it fixed the lag, the new system converted the old file.

Thats very nice to read.

As for that folder/files thing, maybe there's something in the debug.log file that hints at what went wrong~

commented

Here you go :
debug.log (2).txt
I'll have a look too when i get home, I'm currently on my phone and it's not easily readable :')

commented

Yeah, it's a linux/windows thing. In the code i've used \\ which is not how linux does it. Discussing it with someone in discord it turns out that linux apparently uses /

commented

2b8c728 should do it, but right now i can't test it..

commented

I can test it for you if you want. I'm in Flaxbeard's Mods discord (my name is the same, JinKhya) if you don't want to post a jar here :)

commented

I still have a backup of my world with the old dat file

commented

I can test it for you if you want. I'm in Flaxbeard's Mods discord (my name is the same, JinKhya) if you don't want to post a jar here :)

Thanks, just tested it on/in a Linux VM and that fix works

commented

Release with that fix pushed. Have fun :D