ZeroK-RTS / Zero-K

Open source RTS game running on the Spring/Recoil engine
https://zero-k.info
GNU General Public License v2.0
675 stars 202 forks source link

Factory panel reduces fps 120 -> 10 in spectator mode #2344

Open Topkack opened 7 years ago

Topkack commented 7 years ago

Probably because there is 20 factories. Possibly impacts performance negatively when im playing 1v1 too.

GoogleFrog commented 7 years ago

I don't support factory panel. As far as I know there is no in-menu way to enable the widget so it is classed as "use at your own risk". I have never used or profiled factory panel but it has the same history as other core widgets (core selector, integral, selections) with performance and structure problems that I have only recently solved via full rewrites.

Are you sure this is a new issue? If so then something related to the widget has likely changed and you could probably pile some hax into the widget to patch the hole. If it is not a new issue then more work is required, either put off the inevitable and try to fix it or just start over.

I won't touch factory panel as there many more useful things to do. I would rather that anyone capable of fixing factory panel would do something more useful instead but I can't stop them. Someone who uses factory panel and who can fix it is free to see this as higher priority. PRs welcome.

GoogleFrog commented 7 years ago

Also 120fps is not a good measurement. It means really different things if the drop is from 125 or 280.

sprunk commented 7 years ago

Digression but

there is no in-menu way to enable the widget so it is classed as "use at your own risk"

Newcomers regularly ask about the extra widgets (for example because they see Shadowfury use facbar in his casts) and vets regularly tell tem about the Alt+F11 widget menu but never mention that stuff only accessible thence has void warranty.

Topkack commented 7 years ago

100-120 fps in beginning to 9-7 fps (i played a couple games that way seriously)

GoogleFrog commented 7 years ago

Enable the widget profiler (near the bottom of the widget list) to be sure. The performance hit may show up in the chili framework because factory panel may be doing something awful in chili. Ideally send a screenshot.

Does this occur at all while playing? The ticket title says while spectating but you just said "i played a couple games that way seriously".