[4.8.2] Insane lagging, sprite count and think times through the roof

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
User avatar
MFG38
Posts: 414
Joined: Sun Apr 14, 2019 8:26 am
Graphics Processor: nVidia (Modern GZDoom)
Location: Finland

[4.8.2] Insane lagging, sprite count and think times through the roof

Post by MFG38 »

While playing Eviternity with the gameplay mod Angelic Aviary on stream the other day, I ran into this problem in MAP04 where the framerate started tanking horrendously after only a couple minutes. Checking the renderstats seemed to reveal part of the problem, as the engine was rendering up to 40k+ sprites at once. I ran some benchmarks off-stream later that evening and just now, and I took some screenshots of my results from three different setups. See below.

Eviternity + Angelic Aviary on GZDoom 4.7.1
evi_modded_471.png
Eviternity (no gameplay mod) on GZDoom 4.8.2
evi_nomod_482.png
Eviternity + Angelic Aviary on GZDoom 4.8.2
evi_modded_482.png
(That sprite count isn't even at its highest here.)

Some obvious inconsistencies in the results stem from the fact that I roamed around the map while stuff was happening and tried my best to take screenshots of the worst spikes, but you should get the general idea. GZDoom 4.7.1 doesn't spike nearly as hard as GZDoom 4.8.2 with the exact same files (of which there are only 2, granted) in the exact same load order, which leads me to believe that this is an issue introduced in 4.8.2.

In case it's of any relevance, I copied my config file from my GZDoom 4.7.1 installation over to GZDoom 4.8.2 and used that as my config file for 4.8.2 as well.
You do not have the required permissions to view the files attached to this post.
User avatar
Marisa the Magician
Posts: 3886
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Operating System Version (Optional): (btw I use) Arch
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia

Re: [4.8.2] Insane lagging, sprite count and think times through the roof

Post by Marisa the Magician »

What would be nicer to have here is a printout from profilethinkers, because it looks to me that something was spawning more often than it was meant to.
User avatar
MFG38
Posts: 414
Joined: Sun Apr 14, 2019 8:26 am
Graphics Processor: nVidia (Modern GZDoom)
Location: Finland

Re: [4.8.2] Insane lagging, sprite count and think times through the roof

Post by MFG38 »

I wasn't able to get a screenshot of the readout when I did profilethinkers at the top of a lag spike, but the engine did seem to do about 16k calls to the TorchTree1 actor of all things. Benchmarked it against 4.7.1 with the same files and load order and it only made 30-something calls to the same actor.
User avatar
Marisa the Magician
Posts: 3886
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Operating System Version (Optional): (btw I use) Arch
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia

Re: [4.8.2] Insane lagging, sprite count and think times through the roof

Post by Marisa the Magician »

It took me a while to figure this out, but it appears that the forgotten maiden enemies have improperly terminated states (no "Stop" at the end of the "NoextraForgottenMaiden" state sequence) where they'll infinitely spawn more and more copies of torchtree1 if the enemy is disabled in the menu (one of those "NSFW" ones).

This might be worth reporting to the mod author.

Technical details: The reason this infinite loop happens is because the end of that state sequence will jump directly to the spawn state of the next class, which in most cases is a variant of the same enemy, with the same conditional jump to the same state label... And so on and so forth.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49098
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [4.8.2] Insane lagging, sprite count and think times through the roof

Post by Graf Zahl »

MFG38 wrote: Mon Sep 05, 2022 8:27 am I wasn't able to get a screenshot of the readout when I did profilethinkers at the top of a lag spike, but the engine did seem to do about 16k calls to the TorchTree1 actor of all things. Benchmarked it against 4.7.1 with the same files and load order and it only made 30-something calls to the same actor.
The text gets printed to the console where it can be accessed more easily.
User avatar
CherubCorps
Posts: 195
Joined: Fri Sep 11, 2020 8:09 pm
Location: United States

Re: [4.8.2] Insane lagging, sprite count and think times through the roof

Post by CherubCorps »

Yeah, it was TorchTree1 (The actor that replaces the Forgotten maiden statues). Fixed it by adding "STOP" to the end of the file.

Return to “Closed Bugs [GZDoom]”