Author Topic: [fixed] bad slowdown shortly after game starts ( rev 2849 )  (Read 957 times)

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
To see teh problem, just start any kind of setup ( best is you alone without oponent ).
Once the game started don't move the camera position and switch debug info on to see the fps.
Now move the camera ( just a tiny bit with the cursor keys ).

=> you will immidialy see a big fps loss
Examples:
for me ( geforce 9600GT 160 fps down to 100 fps )
tomreyn ( 60 fps -> 30 fps )

We also had this fps loss in 3.5.2, but it was less worse  ( for me 160 fps -> 130 fps )

( Is there some kind of cache management going mad ? )
« Last Edit: 3 December 2011, 08:28:31 by softcoder »
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: bad slowdown shortly after game starts ( rev 2849 )
« Reply #1 on: 19 November 2011, 18:31:27 »
please try svn, i just updated the new font renderer. Also to test ftgl run with --force-ftglfonts and let me know how fps compares?

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Re: bad slowdown shortly after game starts ( rev 2849 )
« Reply #2 on: 19 November 2011, 23:13:54 »
It's 60 to 45 FPS now, and I need to move the camera more. It never recovers though.
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

will

  • Golem
  • ******
  • Posts: 783
    • View Profile
Re: bad slowdown shortly after game starts ( rev 2849 )
« Reply #3 on: 20 November 2011, 10:25:51 »
I haven't investigated but i imagine you are describing how much faster it renders at game start before shadows are turned on?

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Re: bad slowdown shortly after game starts ( rev 2849 )
« Reply #4 on: 20 November 2011, 11:25:20 »
That's after shadows are active. I still get 60 FPS then, but it decreases as soon as you move the camera.

It is now (r2860) 60 FPS to 45 FPS (and only after you move the camera further), so less of a problem. However once it went down to 45 FPS it will never get any higher.
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
Re: bad slowdown shortly after game starts ( rev 2849 )
« Reply #5 on: 20 November 2011, 23:40:34 »
I think it has something to do with renderObjects. Its also used when you render shadows.

comment out renderObjects in game.cpp line 2672 ( renderer.renderObjects(avgRenderFps);)
and line 2635 ( renderer.renderShadowsToTexture(avgRenderFps))

beside the effect that you will not see anymore trees and shadows you will see that the fps stay stable.

UPDATE:
renderer.cpp line ~3637 VisibleQuadContainerCache &qCache = getQuadCache();
change this to VisibleQuadContainerCache &qCache = getQuadCache(true,true);

Then you instantly get the slow frame rates you normally get after camera movement. So I think this QuadCache does not work the way it was meant .. )
« Last Edit: 20 November 2011, 23:53:45 by titi »
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: bad slowdown shortly after game starts ( rev 2849 )
« Reply #6 on: 3 December 2011, 08:28:19 »
I think overall this is no longer an issue as we have improved rendering performance.