[Addressed] Bad performance in Doom 2 Unleashed MAP31

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.

Bad performance in Doom 2 Unleashed MAP31

Postby Player701 » Mon Dec 16, 2019 7:36 am

For some reason, MAP31 of Doom 2 Unleashed demonstrates particularly bad performance in GZDoom. I don't believe this is a technical issue, because it has manifested both on my desktop and laptop. The laptop (GPU = GTX 1050 Ti) is affected more severely: in both Vulkan and OpenGL I only get about 40 FPS on this map, while every other map in this WAD that I've tested so far seems to produce a stable 60 FPS (V-Sync is, of course, on). This happens without any mods, and even in no-monsters mode (but the map doesn't have a lot of monsters so they are unlikely to have too big an impact anyway).

In addition to the above, saving the game while on this map produces a significant FPS drop that lasts for a couple seconds; it is felt even on my desktop PC, which has an RTX 2080 Ti - and during normal play, even this beast of a GPU struggles to maintain a stable 60 FPS, which is evident due to the occasional screen tearing. Do note that I have no heavy post-processing effects enabled (the only one I can remember off the top of my head is bloom; SSAO is off).

Regarding the map itself, it has an above average size compared to the other maps in the WAD, and its architecture does not look overly complex. Therefore, I am unable to ascertain what exactly makes it lag so badly. I hope the developers can find out more.

Tested in GZDoom 4.2.4 and g4.3pre-522-gc5717d98d.
User avatar
Player701
 
 
 
Joined: 13 May 2009
Location: Russia
Discord: Player701#8214
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Bad performance in Doom 2 Unleashed MAP31

Postby Graf Zahl » Mon Dec 16, 2019 8:01 am

This map somehow spawns 79000 scrollers, no wonder it gets slow. But I cannot see right away what's causing this.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Bad performance in Doom 2 Unleashed MAP31

Postby Player701 » Mon Dec 16, 2019 8:11 am

Oh, so it must be putting a load on the CPU then, not the GPU. Regardless... I guess by "scrollers" you mean scrolling walls / floors? The map does use a few various wall- and floor-scrolling specials, but nowhere near to the amount you've mentioned. In fact, the total number of all lines and sectors in this map is far less than that.

UPD: I think I have found the cause, thanks to your mention of scrollers.

Linedefs 2638-2645 in this map have action 254 - "Scroll Wall according to Line Vector". These can be observed by warping to the following coordinates: X = -2340 , Y = 6520. Removing this action from those 8 lines makes the map run smoothly. I have no idea why it would spawn 79000 scrollers, though, since it's evident that it doesn't cause every wall in the map to scroll.

Here is a screenshot of this area, with the scrolling walls marked:

User avatar
Player701
 
 
 
Joined: 13 May 2009
Location: Russia
Discord: Player701#8214
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Bad performance in Doom 2 Unleashed MAP31

Postby Graf Zahl » Mon Dec 16, 2019 9:43 am

I got to the same point. The bug is caused by different default for a non-existent line ID. Hexen uses -1 as the not-set value, Boom uses 0. And in Hexen 0 is a vaild line ID, so each of these 8 lines creates a scroller for every single untagged wall in the map.

This must explicitly handle the 0 case outside the tag iterator loop
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Bad performance in Doom 2 Unleashed MAP31

Postby Player701 » Mon Dec 16, 2019 10:00 am

I see.

Graf Zahl wrote:so each of these 8 lines creates a scroller for every single untagged wall in the map.

But if this is the case, why don't all these walls scroll, then? Because if they did, I would have noticed it immediately.
User avatar
Player701
 
 
 
Joined: 13 May 2009
Location: Russia
Discord: Player701#8214
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Bad performance in Doom 2 Unleashed MAP31

Postby Graf Zahl » Mon Dec 16, 2019 10:43 am

Please don't ask me how this thing works, it's one of those Boom features where all I can do is ask "what were they thinking?"
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Bad performance in Doom 2 Unleashed MAP31

Postby Player701 » Mon Dec 16, 2019 10:49 am

Okay. Sorry. :oops:
User avatar
Player701
 
 
 
Joined: 13 May 2009
Location: Russia
Discord: Player701#8214
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Bad performance in Doom 2 Unleashed MAP31

Postby Player701 » Wed Dec 18, 2019 4:01 am

I guess this is the part where it spawns scrollers for all lines in the map. Adding special handling for tag 0 seems easy enough, but I have no idea if there are any other specials that might need such handling, nor if it might result in compatibility problems later.
User avatar
Player701
 
 
 
Joined: 13 May 2009
Location: Russia
Discord: Player701#8214
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Bad performance in Doom 2 Unleashed MAP31

Postby _mental_ » Tue Dec 24, 2019 9:43 am

BTW there is a special option in PrBoom+ that helps to workaround such mapping "feature".
It's disabled by default though, and PrBoom+ creates 9860 * 8 = 78880 thinkers too.

Will compatibility entry for this map be enough?
_mental_
 
 
 
Joined: 07 Aug 2011

Re: Bad performance in Doom 2 Unleashed MAP31

Postby Graf Zahl » Sun Jan 12, 2020 6:18 am

Fun stuff: Without that option, PrBoom spawns scrollers on all lines EXCEPT the one for which it is intended.
This is a clear mapping bug but I think we can add the fallback without adding a compatibility flag for it, because it would inevitably result in something broken if the alternative handling wasn't active.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Bad performance in Doom 2 Unleashed MAP31

Postby Player701 » Sun Jan 12, 2020 6:41 am

Thank you for addressing this. I guess save files will not be affected, though... Well, no big deal.
User avatar
Player701
 
 
 
Joined: 13 May 2009
Location: Russia
Discord: Player701#8214
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Bad performance in Doom 2 Unleashed MAP31

Postby Graf Zahl » Sun Jan 12, 2020 6:52 am

No, once the scrollers are spawned they will persist.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany


Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 1 guest