WhiskyTangoFawks / Expedition

9 stars 11 forks source link

Major Performance Issues - 1.10.2 - WTF-Expedition-WorldGen_1.10.2_-1.5.0.jar #130

Closed P3rf3ctXZer0 closed 7 years ago

P3rf3ctXZer0 commented 7 years ago

Okay I know you put in the config that this would lag ... but it is unplayable. One thing I want to say is Thank you very much for fixing digimobs compatability. Secondly unfortunately despite your efforts the generation code needs some severe work. I was getting -5 frames. The only mod I added to my pack was this one. At any rate some people to talk to about generation code are Ternsip - Struct Pro Mod creator, Ivorius - Recurrent complex developer, Also Lumien - Understands spawn code. I look forward to the day I can re add this mod.

WhiskyTangoFawks commented 7 years ago

What is your view distance set at? I've tested this in my pack, and it works fine, no framerate drop even with shaders.

WhiskyTangoFawks commented 7 years ago

Yeah, I've done further testing, with my pack, and haven't seen any framerate drop, unless I've got the render distance set to something stupid.

In regards to lag, if the minor change I made is the source of the lag you'll see a comment in your log files saying that the generation buffer is clearing itself. When this happens, it more or less pauses for a few ticks to give my generation a chance to catch up, instead of breaking the buffer. This happens if it gets backed up because you're attemping to generate more chunks than your computer can safely handle (typically, flying around in creative with a high render distance is what causes this issue). Mods that attempt to generate large portions of the world unnessarily can also have this effect (geographicraft's spawn on a coast option can do this).

ate0ate commented 7 years ago

I'm not having any performance issues but I have world holes that are out of control. Render distance of 16 as usual for me. 2017-04-01_15 03 14 2017-04-01_15 03 42 2017-04-01_15 03 57

ate0ate commented 7 years ago

I've been playing with no issue using the prior beta but after updating I get this. I was going to downgrade back to the beta to see if that fixed it again, but I neglected to keep a backup copy and the curse beta are gone.

EDIT: Found a copy of the worldgen1.5beta and reverted, seems to eliminate the world hole issue entirely. Swapping back and forth between the beta and the release results in an unplayable single player experience where exploration is impossible due to severe, never loading holes in the terrain. Strange.

WhiskyTangoFawks commented 7 years ago

Yeah, in order to address this I need to understand what's causing it, and be able to replicate it. My suspicion is that my generator was breaking previously because either the memory or processor speed isn't sufficient for the pack you're running. Previously, if it broke, it just stayed broken and stopped doing anything until the player reloaded the world. The fix for this was to set a maximum buffer size, where it stopped to clear the buffer and catch up if it got too far behind. Anytime this happens, it's logged in the game logs, so if this is the source of the lag it'll show up in there.

I'll put out a version with the max buffer size as a config option (it's in the master config) See if increasing/decreasing it has any effect.

The other thing you can do to help solve the issue, is identify if this is an incompatibilty with another mod. Do you have these problems if WTF expedition is the only mod? And if not, what other mod causes it, or is it an issue of sheer weight of other mods, rather than a specific one.

WhiskyTangoFawks commented 7 years ago

Additionally- Generation holes are the result of chunks not finishing generating- my mod doesn't really do much until after the chunk is fully generated, (along with all the adjacent chunks or to a radius of 2 actually).

The one thing that could potentially cause this is sandstone replacement, which does run prior to chunk generation. You could turn it off and see if that makes a difference, although I'd be suprised if it was the source of the issue. Make sure to update to 1.5.1 first though, which I'm putting out now. The previous version had a bug where that option wasn't enabled correctly.

ate0ate commented 7 years ago

I was actually getting holes like this, or closely resembling this, in already generated chunks sometimes as well. I was migrating my base from one mountain to another and crisscossing between the same valley. In the beta no issues but after the update I would run into a "hole" at times where I could see the particle effects of various things in world and mobs, but the ground was invisible. Sometimes I could walk into the unrendered area and other times the player would get "stuck" like in a more traditional world hole. Also the area I've been living in for a while, cleared out and leveled spontaneously grew a large, 2x2 oak tree. Out of nowhere. Kinda creepy lol. Definitely was a chunk that had been loaded and fully generated long ago. I will try out the 1.5.1 release and play around with the config for a bit.

ate0ate commented 7 years ago

Not sure what's going on yet really. It runs terribly no matter what I adjust, except for disabling the tree generation. It seems out of control. Its placing entire forests where there are no trees. For example in flower fields or BoP's Highlands biomes. Chapperals and shrublands look like jungles of oak trees. I tried to take some screenshots but it populates with trees rather quickly so its hard to show a good before and after. I will keep investigating and checking against other mods. 2017-04-01_18 12 17 2017-04-01_18 12 52

ate0ate commented 7 years ago

Here's a really interesting post by mezz that may or may not be related to what is happening here... https://www.reddit.com/r/feedthebeast/comments/5x0twz/investigating_extreme_worldgen_lag/

P3rf3ctXZer0 commented 7 years ago

Since your fix the modpack has been running fine for me thank you whisky for the fixes.

WhiskyTangoFawks commented 7 years ago

It's not run away world generation on my end, I've gone to extreme lengths to deal with that issue, and am confident it's dealt with. However, if another mod is causing the runaway chunks to generate,my mod will attempt to decorate them, which will make the lag exponentially worse. Check your logs, if this is occuring, then you should see messages about the generation buffer clearing from my mod if this is the case.

Biome's O Plenty has issues with my tree generation. It has the number of trees variables set wrong in a lot of it's biomes. Presumably, it has the vanilla variable, but then doesn't use it.

ate0ate commented 7 years ago

I'm at a loss. Nothing in the logs other than a ton of can't keep up messages. Turning off tree gen does fix this, but I agree fully with you that it is not the fault of Expedition and doesn't fix the actual problem. Your updates and allowing me to change the buffer via config certainly helped with many of the performance issues, but his recursive decoration is killing gameplay for me. I am unable to pinpoint the culprit and cannot see any noticeable changes adding or subtracting mods one at a time. Using your mod alone of course results in no issues at all. For now I am reverting back to the 1.5.0 beta as its performance is the best for me and I cannot figure what other mod is causing issues on my end. Feel free to close the issue and thanks a lot for your time.

WhiskyTangoFawks commented 7 years ago

It's likely a combination of minor issues. A lot of poor optimisation during generation can be ignored until you start layering too much stuff on top. Expedition is enough of a beast to make those problems more obvious.

The other possibility, which seems unlikely, is that your computer is single core. The the 1.5 beta process was developing multithreading that minecraft doesn't normally use.

One other suggestion, might be to just turn my trees off, and rely on RTG for larger trees.

ate0ate commented 7 years ago

Yeah, I think its a bunch of mods little issues adding up to one big mess in my instance. I agree entirely that Expedition just makes all those little issues very very obvious. I don't think I have a single core processor, its an alienware laptop corei7 2.6Ghz with 16G of ram. I don't think that's great, but I don't think that's terrible either. I'm gonna keep messing around and see if I can figure out which mods are causing the most problems, but I agree that Expedition most likely has nothing to do with it at this point. Thanks again.