Performance Warnings

Moderator: GZDoom Developers

User avatar
Rachael
Admin
Posts: 13107
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her

Re: Performance Warnings

Post by Rachael »

The idea is more to put the PB/BD authors themselves on the spot, than to actually educate the users, themselves. And making it hard to ignore.

Here's a fun fact: Without PB my computer runs GZDoom between 300 and 500 FPS. And it's not even a good computer. So yeah, some "unoptimized piece of shit" GZDoom is.

So yeah - the idea is to embarrass the authors themselves. And making GZDoom warn about the mods, specifically, just isn't going to have the intended effect. The effect we want is for the authors to be more aggressive with optimizations on *their* end - rather than just blaming GZDoom - and if they are, then GZDoom stops embarrassing them. If the mods themselves are singled out, there is no motivation at the end for the mods to fix their problems.

You might say "2 can play at that game" - sure the authors can put messages in their mods directly about how much GZDoom sucks. But to that I say - then why are you using it? Go, move your mod to prBoom, which apparently works "so much better". I'll wait for you to come back after you realize that you can't even port the first line of code over.

GZDoom only does what you tell it to do. If you tell it to spawn 500,000 actors that do absolutely useless shit and barely even add to the experience - it's going to spawn 500,000 wasteful actors that do absolutely nothing except slow the computer to a crawl. Computers can only do a limited amount of things at a time - no matter how well "optimized" GZDoom itself is - GEE, WHO KNEW? Didn't see that one coming, did you? The amount of sheer idiocy from people blaming the wrong things and playing hot potato with the optimization issues is deafening, and the buck has to stop somewhere. There's only so much you can do to optimize GZDoom before the authors of said mods have to start taking responsibility themselves for the things they're doing wrong in the engine.
User avatar
Marisa the Magician
 
 
Posts: 3853
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia

Re: Performance Warnings

Post by Marisa the Magician »

I think the best course of action to call out badly coded mods would be an analysis video or something, to be honest.
User avatar
Ihavequestions
Posts: 126
Joined: Mon Jul 12, 2021 1:45 pm
Graphics Processor: nVidia with Vulkan support

Re: Performance Warnings

Post by Ihavequestions »

As someone who's used all kinds of machines -- low-end, mid-range, and high-end -- with GZDoom, the best way to speed it up on any Windows system is to exclude its program folder from Windows Defender's real-time protection.

Other AV scanners might suffer from similar issues, too, but Windows Defender's behavior is especially bad as it will scan anything GZDoom reads from disk over and over again, every single time, really. It is bad already with vanilla but becomes exponentially worse with PB/BD and other demanding mods. On slower machines, it can render an otherwise well-running game unplayable.

So telling people about the AV exclusion would be a good first step. Perhaps check for a running Defender exe, and then make the user aware of those issues.
User avatar
Enjay
 
 
Posts: 26430
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: Performance Warnings

Post by Enjay »

That may well be correct (as in, I don't know, but I can believe it) but there is an obvious problem there. You are suggesting that GZDoom puts up a message that essentially says "switch your malware protection off". I'm sure you can see how such a suggestion might be interpreted by some people who see it.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 48375
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Performance Warnings

Post by Graf Zahl »

I also doubt that it is this bad. One important thing about GZDoom's file system is that it keeps its resource files open. Which also means they cannot be modified while open. And AFAIK these AV checks are only being performed when the file is opened, not when some random content is read from it.

In any case, I never had AV related performance issues ever - with any of my computers - and I've been using Defender for many years.
User avatar
Matt
Posts: 9680
Joined: Sun Jan 04, 2004 5:37 pm
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: Performance Warnings

Post by Matt »

Rachael wrote:GZDoom only does what you tell it to do. If you tell it to spawn 500,000 actors that do absolutely useless shit and barely even add to the experience - it's going to spawn 500,000 wasteful actors that do absolutely nothing except slow the computer to a crawl. Computers can only do a limited amount of things at a time - no matter how well "optimized" GZDoom itself is - GEE, WHO KNEW? Didn't see that one coming, did you? The amount of sheer idiocy from people blaming the wrong things and playing hot potato with the optimization issues is deafening, and the buck has to stop somewhere. There's only so much you can do to optimize GZDoom before the authors of said mods have to start taking responsibility themselves for the things they're doing wrong in the engine.
I think a lot of these complaints about GZDoom's performance come from a combination of

(a) a lot of old DECORATE methods that require spawning new temporary actors
(b) the more significant overhead in initializing each actor since ZScript became a thing
(c) insufficient testing on slaughtermaps

and the fact that we're now dealing with a large proportion of the userbase for whom their formative computing experiences are opaque, locked-down mobile device UXs that are very removed from the reality of managing disk space and checking what programs are running and what's taking up RAM, and don't have any "natural instinct" for knowing when to start pruning things to maintain performance. (Some of the setups I've seen for people's autoloads, and some of the DECORATE methods I've seen get recommended because "ZScript scary", feel like the equivalent of people who would run up a month's worth of internet in a week because they're streaming all their music and storing all their photos on the cloud at the highest resolution their (completely needlessly high-res) phone cameras have to offer. Anyway, gonna stop before I go on a much worse rant.)

(Obviously I'm not innocent either, with all the slide shows in HD that have only fairly recently been addressed with substituting particle effects...)
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 48375
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Performance Warnings

Post by Graf Zahl »

Matt wrote: and the fact that we're now dealing with a large proportion of the userbase for whom their formative computing experiences are opaque, locked-down mobile device UXs that are very removed from the reality of managing disk space and checking what programs are running and what's taking up RAM, and don't have any "natural instinct" for knowing when to start pruning things to maintain performance.
That's indeed the problem most of the time. I started programming on a C64 where efficiency was paramount, and to this day I can see what code may be slow. Modern programmers/scripters often lack that awareness and the result can be awful.
And of course there's mappers for which the visual presentation is all that counts, screw performance. Here again they are doing their thing without awareness of how costly it is, but when they have to scale down they run out of ideas.
yum13241
Posts: 335
Joined: Mon May 10, 2021 8:08 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): EndeavorOS (basically Arch)
Graphics Processor: Intel with Vulkan/Metal Support

Re: Performance Warnings

Post by yum13241 »

And of course there's mappers for which the visual presentation is all that counts, screw performance. Here again they are doing their thing without awareness of how costly it is, but when they have to scale down they run out of ideas.

Super true with AAA game studios too. Then again there's stuff like NUTS.WAD which intentionally tries to lag your PC.


IMO if GZDoom detects there are a LOT of actors being loaded it should show a dialog box to the screen with this. (since most, if not all laggy mods have a bunch of actors):



HOLD UP! Potentially slow setup detected!
---
The mod(s) you are loading contain X actors. We cannot ensure that the game will perform well and any complaints should be directed to the mod developer(s) and not to the GZDoom developers. Please make sure that your hardware is up to the task.

[OK, I understand] [Cancel]


Again some mods might use a lot of actors that are just


ACTOR InventoryItemForReload : Inventory {}

which should be excluded from the check? Maybe check to see if it has at least 100 lines of code.
User avatar
wildweasel
Moderator Team Lead
Posts: 21519
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10, 21H1
Graphics Processor: nVidia with Vulkan support

Re: Performance Warnings

Post by wildweasel »

That's not really what the problem is. The number defined actors isn't the source of most performance issues in mods; it's generally going to be thousands of spawned instances of one actor, like a blood droplet, a bullet spark, smoke effects from a gun, or a weather system that spawns thousands of rain drops every second. The engine has trouble keeping up with all that.
yum13241
Posts: 335
Joined: Mon May 10, 2021 8:08 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): EndeavorOS (basically Arch)
Graphics Processor: Intel with Vulkan/Metal Support

Re: Performance Warnings

Post by yum13241 »

You could also track how many times an actor is spawned too, maybe track A_SpawnItemEx?
Darkcrafter
Posts: 531
Joined: Sat Sep 23, 2017 8:42 am
Graphics Processor: nVidia with Vulkan support

Re: Performance Warnings

Post by Darkcrafter »

Can't even imagine how many warnings it gets with my mapset if ever introduced

Return to “Closed Feature Suggestions [GZDoom]”