A_RemoveLight causes severe lag on high detail maps

Forum rules
Please construct and post a simple demo whenever possible for all bug reports. Please provide links to everything.

If you can include a wad demonstrating the problem, please do so. Bug reports that include fully-constructed demos have a much better chance of being investigated in a timely manner than those that don't.

Please make a new topic for every bug. Don't combine multiple bugs into a single topic. Thanks!

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is ON
[img] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: A_RemoveLight causes severe lag on high detail maps

Re: A_RemoveLight causes severe lag on high detail maps

by Graf Zahl » Wed Aug 11, 2021 11:57 pm

4.6.1 was before the fix. I only addressed a potential problem there yesterday.

Re: A_RemoveLight causes severe lag on high detail maps

by Marisa the Magician » Wed Aug 11, 2021 5:36 pm

It's not happening anymore, it seems. But it appears that even in 4.6.1 it's already fixed. (nvm it actually still happens in 4.6.1)

No matter how many times I relaunch my mod and frozen time and fire the projectile that causes the issue, there are no freezes whatsoever with a fresh build. It's definitely fixed.

Re: A_RemoveLight causes severe lag on high detail maps

by Graf Zahl » Wed Aug 11, 2021 12:21 pm

Does this still happen after today's change to the light management?

Re: A_RemoveLight causes severe lag on high detail maps

by Marisa the Magician » Sat Oct 17, 2020 1:10 pm

Considering that I don't see the issue ever happen if I get rid of the light attach/remove, I doubt it's the effect actors. I spawn boatloads of those in the mod proper and there are no issues with that.

Re: A_RemoveLight causes severe lag on high detail maps

by Graf Zahl » Sat Oct 17, 2020 6:11 am

Are you even sure it's really the light and not a random coincidence?

This looks more like a garbage collection related problem. From the looks of it that projectile is spawning quite a bit of effects actors.

Re: A_RemoveLight causes severe lag on high detail maps

by Marisa the Magician » Sat Oct 17, 2020 6:02 am

Guess it fixed itself, can't reproduce it either.

Edit: Nevermind, it happened again, seems to be entirely random. In most cases it only happens on specific launches.

Re: A_RemoveLight causes severe lag on high detail maps

by Graf Zahl » Sat Oct 17, 2020 4:46 am

I cannot reproduce any slowdown, not even in a debug build.

Re: A_RemoveLight causes severe lag on high detail maps

by Marisa the Magician » Sat Oct 03, 2020 9:15 am

It's not possible to deactivate the light if it's handled through AttachLight.

There's no function for that.

Re: A_RemoveLight causes severe lag on high detail maps

by Rachael » Sat Oct 03, 2020 6:40 am

What happens if you deactivate, and then remove the light? (Just going on a haunch here)

Re: A_RemoveLight causes severe lag on high detail maps

by Marisa the Magician » Sat Oct 03, 2020 3:42 am

The lag is ONLY caused by removing that specific light the projectile attaches to itself.

Re: A_RemoveLight causes severe lag on high detail maps

by Major Cooke » Fri Oct 02, 2020 2:36 pm

Curious. Does it lag more if you just deactivate the light in particular?

A_RemoveLight causes severe lag on high detail maps

by Marisa the Magician » Fri Oct 02, 2020 2:06 am

Discovered this accidentally while playing my mod recently. I have a certain projectile that manually attaches a light to itself, then removes it on death (mainly because it uses the same sprite and frame on both spawn and death, so I can't simply use gldefs to assign it).

The following file is a stripped down version of that projectile. Typing "summon loveheart" in any map with lots of complex geometry (this even includes Frozen Time, so there's that for a test), and waiting for the projectile to hit something, you'll notice gzdoom will freeze for a while, every time. It appears that the slowdown happens somewhere in FDynamicLight::CollectWithinRadius (a_dynlight.cpp line 356).

Top