EarendelDevelopers / factorio-mods

This is a public repository for tracking issues with Earendel's factorio mods.
19 stars 3 forks source link

space ex: Core mining drill has a ~200ms spike when presenting rate tooltip on v0.6.113 #319

Closed IRSmoh closed 10 months ago

IRSmoh commented 10 months ago

(also affects some earlier versions, but unclear of when it was introduced) image

Expected behavior: functionally zero overhead when the tooltip is displayed OR the tooltip display not being displayed constantly while the miner is running

Actual behavior: huge spikes whenever the output rate is displayed, it isn't fully consistent on the spikes but it does consistently happen to render the game effectively unplayable due to spikes (I mean, it's interactible, but you don't want to go from 8ms to 200ms+ stutters every 5s)

system specs: cpu: 7950x mem: ddr5 6000 cl 32/32/96 OS: win10 ltsc

no notable background process usage.

save for reproing available in: (it's a chunky base) https://drive.google.com/file/d/1XlXGfwqmjviKuahV4Ow6K2cCVBlCGQAg/view?usp=drive_link

the issue should be reproable on a drastically smaller planet/setup.

Quezler commented 10 months ago

Actually https://mods.factorio.com/mod/se-core-miner-output-helper is one of my personal mods. 😃

The reason it lags is pretty simple, i didn't bother keeping a count of the core miners in case Space Exploration somehow somewhere does some stuff that other mods cannot track, so each time you hover a core miner it just does a full surface search, which players can abuse/spam by quickly moving their mouse over it a bunch of times.

During my own private playthroughts with just a handful of trusted players it never really came up as an issue, but i'd assume that for a large public multiplayer server with 10-20+ people online it could become quite the annoyance, but i haven't received any reports of that happening yet.

For this mod i've found an on-demand lagspike acceptable since its player initiated "so you know where its coming from and is predictable", though it might spook multiplayer players a bit.

Essentially just don't hover the core miner when you don't need to see the output and/or want a spike.

If space exploration could expose in a remote call the amount of core miners on a surface that it itself tracks i will be updating my QOL mod to use that instead of an expensive surface search. 🚧

Quezler commented 10 months ago

Actually now looking at the code of SE to see if such an api addition could be made it appears the core miners are stored in a self-validating table on the zone itself which already gets exported, give version 1.0.2 a go would you? 🤔

IRSmoh commented 10 months ago

spikes are not as severe, so that works. I probably should have taken the hint that it was a different mod given the debug name lul