Author Topic: --enable-debug and recent CS  (Read 1332 times)

Wired_Crawler

  • Hydlaa Citizen
  • *
  • Posts: 429
    • View Profile
--enable-debug and recent CS
« on: June 03, 2006, 03:22:06 pm »
In recent version of CS (svn rev. 24364) I get big difference in performance between versions compiled on linux in debug and release mode. For example:

  • CS built with --enable-debug, hydlaa_plaza, 640x480, walktest: 10-12 fps; podium, 640x480, walktest: 140 fps
  • CS built without debugging, hydlaa_plaza, 640x480, walktest: 35-40 fps; podium, 640x480, walktest: 255 fps

Also, it seems that I have problems with portals again, as described on bugtracker in report #1533 (up to 2x more fps for floating portals than "normal" portals).

I use gcc 3.4.5. Can anyone confirm this ? Or is it only me who makes such observations ? Maybe I should update gcc or something ?
"Close the world, txEn eht nepO."

DaveG

  • Forum Addict
  • *
  • Posts: 2058
    • View Profile
Re: --enable-debug and recent CS
« Reply #1 on: June 03, 2006, 04:44:31 pm »
Just out of curiousity, what do you get with "--enable-debug --with-optimize-debug-info"?

::  PlaneShift Team Programmer  ::

Xordan

  • Crystal Space Developer
  • Forum Addict
  • *
  • Posts: 3845
  • For God and the Empire
    • View Profile
Re: --enable-debug and recent CS
« Reply #2 on: June 03, 2006, 06:47:08 pm »
Ummm... you know that the performance difference is totally normal right? There's a reason why optimized mode is called optimized mode and runs faster :P

Wired_Crawler

  • Hydlaa Citizen
  • *
  • Posts: 429
    • View Profile
Re: --enable-debug and recent CS
« Reply #3 on: June 04, 2006, 05:30:59 am »
Just out of curiousity, what do you get with "--enable-debug --with-optimize-debug-info"?

The same. No difference, at least I don't see any.

@Xordan: Yes, it sounds logical, but such a huge diference is surprising - 50-75% of power goes for debugging. But if You say that it's normal - OK.

Maybe You should warn people in build guide, that using "--enable-debug" will make PS run 2-4x slower :P ?

And about portals - there do is a problem with them. Look at the following results, I was watching hydlaa_plaza through the exit from Laanx temple (portal _p_laanx_entrance2hydlaa_plaza), 640x480, optimized build, gcc 3.4.5, glibc 2.3.5:

1) CS from 16 march 2006
  • portal without "float" flag: 80 fps
  • portal with "float" flag: 83 fps
2) current "official" CS version for PS (rev. 24364)
  • portal without "float" flag: 42 fps
  • portal with "float" flag: 66 fps
Between jan/06 and march/06 performance was degraded in similar way.
Keep this in mind before releasing next version of client, please.
"Close the world, txEn eht nepO."

DaveG

  • Forum Addict
  • *
  • Posts: 2058
    • View Profile
Re: --enable-debug and recent CS
« Reply #4 on: June 04, 2006, 11:25:43 am »
Debug mode makes everything slower, seeing as it's not optimize mode.  This is true when compiling anything.

::  PlaneShift Team Programmer  ::

Induane

  • Veteran
  • *
  • Posts: 1287
  • What should I put here?
    • View Profile
    • Vaalnor Inc.
Re: --enable-debug and recent CS
« Reply #5 on: June 14, 2006, 09:51:52 am »
I could be wrong here but I could have sworn that the performance difference used to be much smaller - when I was first getting builds to work I though I was getting somewhere around 10-15% worse performance with --enable-debug.  I can't imagine why its the way it is now...

Wired_Crawler

  • Hydlaa Citizen
  • *
  • Posts: 429
    • View Profile
Re: --enable-debug and recent CS
« Reply #6 on: July 07, 2006, 02:50:06 pm »
Akhem.
About those slow portals.
Why on earth nobody told me to update my drivers :oops: ?

The problem was the result of last changes in data/shader/snippets/std_lighting.cscg. I have updated Nvidia Cg toolkit to version 1.4.1 and now portals work great :).

Just for Your records.
"Close the world, txEn eht nepO."

LigH

  • Forum Legend
  • *
  • Posts: 7096
    • View Profile
Re: --enable-debug and recent CS
« Reply #7 on: July 12, 2006, 12:44:41 pm »
Those "Cg toolkit" files ... are they only necessary for "FX class" GPUs? I guess they won't help much on a GeForce2 GTS (with only 32 MB).

Gag Harmond
Knight and Ambassador
The Royal House of Purrty

Wired_Crawler

  • Hydlaa Citizen
  • *
  • Posts: 429
    • View Profile
Re: --enable-debug and recent CS
« Reply #8 on: July 12, 2006, 01:24:05 pm »
Cg toolkit is required by CrystalSpace, more precisely, it is needed for certain shaders, which are written in Cg language. I guess Cg libraries are needed to parse/compile them (look in that .cscg file mentioned above). GeForce2 GTS definitely has hardware support for shaders (does GTS mean Giga Texel Shader?), so I'm almost sure, that You need it. Furthermore, in binary distribution of PS, CS is linked with Cg libraries, so You won't be able to play PlaneShift without them.
"Close the world, txEn eht nepO."

LigH

  • Forum Legend
  • *
  • Posts: 7096
    • View Profile
Re: --enable-debug and recent CS
« Reply #9 on: July 12, 2006, 04:44:58 pm »
A GeForce2 GTS may have basic vertex shaders (generic TnL), but no pixel shaders...

Adrian's Rojak Pot: Desktop GPU Comparison, NVIDIA page

Gag Harmond
Knight and Ambassador
The Royal House of Purrty

Wired_Crawler

  • Hydlaa Citizen
  • *
  • Posts: 429
    • View Profile
Re: --enable-debug and recent CS
« Reply #10 on: July 13, 2006, 01:39:40 am »
Wrong. GeForce 2 GTS was the first chip, which thanks to "NVIDIA Shading Rasterizer" supported per-pixel shading. Read for example this review or this article.
"Close the world, txEn eht nepO."