Zandronum Chat on our Discord Server Get the latest version: 3.2
Source Code

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001952Zandronum[All Projects] Bugpublic2014-10-09 19:432014-12-28 13:39
ReporterTribeam213 
Assigned ToTorr Samaho 
PrioritynormalSeveritycrashReproducibilityalways
StatusassignedResolutionopen 
PlatformMicrosoftOSWindowsOS VersionXP/Vista/7
Product Version1.3 
Target VersionFixed in Version 
Summary0001952: Extreme lag from an old wad
DescriptionSo I've been going through a lot of old mods lately, when I came across this lag problem in supersonicdoom

On Map28 there is a room full of fans, whenever you walk in and the fans activate, the game starts lagging to about... 0 fps...

Tried to figure out why it happens before I posted this report, but couldn't reproduce the problem in my own test map.

This happens in both 1.3 and 2.0
Does not happen in ZDoom or GZDoom
Steps To ReproduceAt the start of the map, turn on noclip, turn 90 degrees to your left, and head straight.
Attached Files

- Relationships

-  Notes
User avatar (0010434)
Dusk (developer)
2014-10-09 19:55

Without a WAD link this report is pretty much useless.
User avatar (0010435)
Tribeam213 (reporter)
2014-10-09 20:01

'http://www.gamers.org/pub/idgames/levels/doom2/Ports/megawads/sonic.zip [^]'

Sorry about that, forgot
User avatar (0010437)
Dusk (developer)
2014-10-09 21:04
edited on: 2014-10-09 21:05

Debugging says the culprit is the horribly inefficient P_FindFirstFreeFloorID() function. I'll optimize this function (and its twins >_>).

User avatar (0010441)
Dusk (developer)
2014-10-09 22:10

Turns out this function has *seven* different twin functions. This is requiring rather major rework to make into anything sensible. This patch is going to be a teeny bit larger than I first anticipated as I'm going in for a full refactor.
User avatar (0010444)
Dusk (developer)
2014-10-10 01:24
edited on: 2014-10-10 01:34

Big one incoming here:'https://bitbucket.org/crimsondusk/zandronum-stable/commits/19fbc48cc324fee30aebe5e19e9783ed8ff9e2fc [^]'

- all movers, ceilings, floors, pillars etc alike now use a single pool of 2^16 mover net IDs instead of 2^13 each (overall this increases the limit somewhat)
- new, linear-complex net ID choosing algorithm doesn't cause lock-ups in less-than-ideal scenarios, sonic map28 has a *lot* of instant movers in the fan hall, which caused the FindFreeFloorID function to spaz out
- a large amount of code duplication removed

No zandronum-history entry yet because I don't consider this changeset complete. I'm expecting something to crop up as this obviously enough needs through testing. Thus also needs a build for testing...

User avatar (0010481)
Torr Samaho (administrator)
2014-10-11 13:00

I think it's not worth to make the code more complicated just so save a few kb of memory. If you really want to avoid using more than a bit to store a bool, I suggest to create a bit vector class that completely encapsulated all the bit shifts and index arithmetics.

Also, why do you invent a completely new network index handling algorithm when we already have one (ACTOR_GetNewNetID) and you could generalize that one instead? From a quick glance, I'd say that the existing mechanism is even more efficient. It won't necessarily slow down with the number of already used IDs while yours will go through all IDs starting from the first to find a free one (see how g_ulFirstFreeNetID is used).
User avatar (0010482)
Dusk (developer)
2014-10-11 13:24

So you're saying we should tie the mover net IDs in with actor IDs?
User avatar (0011093)
Torr Samaho (administrator)
2014-12-27 16:38

For the record, we discussed this on IRC a while ago. I don't mean to use the same ID list for actors and movers, just the same ID list management code. I converted the actor ID list code to a class locally, to make this possible without code duplication. Still needs some refinement though before I can push it to the stable repository.
User avatar (0011097)
Torr Samaho (administrator)
2014-12-28 13:39

I added the ID list code to the stable sandbox. Still almost untested, but should be good enough to try this with the movers.

Issue Community Support
Only registered users can voice their support. Click here to register, or here to log in.
Supporters: unknownna
Opponents: No one explicitly opposes this issue yet.

- Issue History
Date Modified Username Field Change
2014-10-09 19:43 Tribeam213 New Issue
2014-10-09 19:55 Dusk Note Added: 0010434
2014-10-09 19:55 Dusk Assigned To => Dusk
2014-10-09 19:55 Dusk Status new => feedback
2014-10-09 19:55 Dusk Assigned To Dusk =>
2014-10-09 20:01 Tribeam213 Note Added: 0010435
2014-10-09 20:01 Tribeam213 Status feedback => new
2014-10-09 21:03 Dusk Assigned To => Dusk
2014-10-09 21:03 Dusk Status new => assigned
2014-10-09 21:04 Dusk Note Added: 0010437
2014-10-09 21:05 Dusk Note Edited: 0010437 View Revisions
2014-10-09 22:10 Dusk Note Added: 0010441
2014-10-10 01:24 Dusk Note Added: 0010444
2014-10-10 01:24 Dusk Status assigned => needs review
2014-10-10 01:34 Dusk Note Edited: 0010444 View Revisions
2014-10-10 01:34 Dusk Note Edited: 0010444 View Revisions
2014-10-11 13:00 Torr Samaho Note Added: 0010481
2014-10-11 13:01 Torr Samaho Status needs review => feedback
2014-10-11 13:24 Dusk Note Added: 0010482
2014-12-27 16:38 Torr Samaho Note Added: 0011093
2014-12-27 23:22 Dusk Assigned To Dusk => Torr Samaho
2014-12-27 23:22 Dusk Status feedback => assigned
2014-12-28 13:39 Torr Samaho Note Added: 0011097






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2025 MantisBT Team
Powered by Mantis Bugtracker