r465 Massive slowdown with multiple moving floors

Bugs that have been resolved.

Moderator: Graf Zahl

Locked
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

r465 Massive slowdown with multiple moving floors

Post by Enjay »

Try the attached sample file. It should load just fine. Then puke script 1 and, if it happens like it does on my machine, the game will slow to a <1fps crawl and log multiple messages at the console.
Spoiler: Lots of console messages
That's only a fraction of it. Just a few seconds of play spammed so much to the console that this forum would not accept it as it had almost twice the maximum character per post limit!
Attachments
steppy.zip
(25.33 KiB) Downloaded 60 times
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: r465 Massive slowdown with multiple moving floors

Post by Graf Zahl »

Damn, Looks like I forgot to remove that debugging message.

Please retry. I'd really like to know how this code behaves in such a situation for real.
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Re: r465 Massive slowdown with multiple moving floors

Post by Enjay »

OK, the massive slowdown has gone - obviously it was due to the console messages. In the full version of this map the new code has a very slight negative impact on my machine.

r461 348fps
r466 338fps

Both readings were taken in exactly the same spot whilst facing the same angle etc (the P1 start in the map).


Interestingly, I noticed in the test map that with the script not activated, I was getting a fps value of around 590-600 but when I activated the script and the floors started moving, I got an increased fps value of around 680. I'm sure that there is a good reason for it, but I would have expected the fps to slow down, not speed up when the script was activated.

However, I get a similar pattern with the older code. With r461 and the test map, I got 640-60 fps with the script not running and around 760-780 with it running. So, again, the older code gave me better fps values.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: r465 Massive slowdown with multiple moving floors

Post by Graf Zahl »

With such ridiculously high fps rates even the slightest increase in code execution can cause some differences.

I added some code that checks the sector heights each frame to update the VBO. Obviously they add a small amount of execution time. The FPS differences you list amount to 0.1 to 0.18 ms and this seems to be the cause.

The differences between moving and non-moving sectors are much more interesting though. They would mean that using VBOs is actually slower than using immediate mode (quite contrary to everything OpenGL manuals tell you... :?)

EDIT: Just made a quick test myself. On my GF 8600 using VBOs is marginally faster than using immediate mode - but certainly not what the experts claim it would.
Locked

Return to “Closed Bugs”