Dungeon Lighting update lag solution(s)
AlienXtream opened this issue · 16 comments
a config option to either disable their "update on touch" (like redstone ore) feature OR set them to "glowing:true" by default. i know this technically makes the dungeon safer but i'd rather it be trivial than near impossible due to lag.
to compensate for this a couple of changes could be made to the dungeons, including spawners with custom light level requirements (iirc that is a vanilla feature of spawners to change the max light level for spawning) scattered through out and/or some entities spawned WITH the structures themselves (with custom properties like persistence, more HP, gear, etc)
Thats interesting, can you use a profiler like VisualVM and give me the reasults? I play on a laptop and dont have lag issues. But I know a friend with a super beefy computer had lag problems - which I diod nto see at all when he tried to show me.
you claim not to have the issues but the problem is a vanilla one. its not a constant low FPS but FPS drops caused by many lighting updates in a short space of time, such as a mob or player walking over the whats-it-called blocks. you also have to consider that your mod is used in the context of larger mod packs so, while there may be enough processing overhead in the dev/testing environments in a real world setting there's going to be other mods that use up the CPU time too. im not asking you to fix the lighting update lag (again, as thats vanilla). im saying to not do something that is known to cause low FPS. sure, i may only drop from 80-90 FPS to 50-60 on my beefy computer (built for heavy MC, ARK, Blender, etc) but thats the average. there's a stutter and input delay that can be fatal for the player when fighting mobs. server perfornamce is also something to consider as many frequent lighting updates do lag a server too. again, this all stems from the vanilla "bug" (limitation) related to frequent lighting updates. its why you dont see huge redstone lamp setups on fast clocks. its just laggy.
its a vanilla one yes, light update takes time but they arent as bad for me to cause any amount fo noticable lag. And even with mods installed non should change the light pipeline to any performance relevant extend, except "performance mods" whith mixin, those make things worse often enough.
well regardless it would be nice to have a config for it or something to disable the auto lighting feature.
disablling the lightning updates would mean the Dungeon keep spawning monsters even if you have already explored that area, I am suprirsed you ahve prblems, does that also means placing torches on the ground cuases alot og lag ?
if i place down a dozen or so in quick sucsession (like, as fast as the game will let you) then yes. its not constant lag. just when a bunch of mobs decide to walk on the blocks. even if JUST the player walking on them or punching them lit them up. its the mobs walking over them randomly that create the unexpected spikes. THATS the issue. the drop isn't game breaking but it is annoying and something that's quite trivial to fix IMO. thats also why im saying for it to be a config option. so by default it works as you intend it but IF it causes a problem for someone in a specific circumstance then they have the option to turn off the auto lightup. for me personally the lag is indeed trivial but it is there and others may not have very good computers.
this isn't a "my game is laggy! fix it" suggestion.
its a "FIY this is known to cause SOME people issues. here's a couple ideas to help with it".
i even provided a couple ideas to offset the difficulty if they were to default to on (custom spawners/enemies in structure files)
Mobs arent supposed to trigger this at all, and this is then a serious bug. Are you sure about that? I have severeal checks in place to trigger that only from players and not from Mobs. Or could a mod be installed that adds mobs which extend the player?
this is 1.16.5 btw. sorry if that was unclear. so if you changed it since then. i didn't know there was a 1.18+ version yet
also in 1.16 it checks for a player see: https://gitlab.com/MCenderdragon/Futurepack/-/blob/1.16/src/main/java/futurepack/common/block/misc/BlockQuantanium.java#L66
tested in an control environment and it does indeed only update for the player. though i did notice some minor stuttering there too. again, more of a "feel" than a "see" type of lag. im loading up my 460+ mod pack to see if its different there.
ok. its not mobs triggering the blocks but they are still quite laggy in my setup it seems.
https://www.youtube.com/watch?v=ZCnKHZY8L9o
never mind... im jsut a bit dumb and slow sometimes... its not a void world... its solid world... that means its got blocks to generate... so as i explore some chunks start to load...
The stutter you experience is from GC as clearly visible by the memory jumps from 55% down to 44%. I suggest updating java (you are at java 8 _51, latest is jav 8 _211 or soemthing) and using G1 GC wich was developed for games.