Really strange performance

Hi there!
I have set up a pretty simple (render-wise) application, that holds nearly every geometry in VBO’s and does an endless PeekMessage->Draw Frame loop. However, every now and then, a frame seems to take ages to complete (sometimes there’s audible hd access, sometimes not), yielding somewhat yaggy animation. Thats why I downloaded Compuware’s Profiler. I ran the app a few seconds and the profiler shows me that it rendered a total of 12.958 frames. During all that time, “RtlGetLastError32” 2.272.013 (!) times. Now I wonder if that is normal Win32 behaviour? In the rendering loop, nothing but BeginPaint, EndPaint, SwapBuffers, PeekMessage, TranslateMessage, DispatchMessage is called.
Also, is it advisable to increase the process priority to anything over normal?
Am I possibly sending too many frames to the GPU, so that it stalls for a really (50-100ms) long time? (Vsync is turned off)

Michael Steinberg

Update: It seems that most of these GetLastError calls actually happened during scene loading by the Collada DOM. The problem still exists though :frowning:

Sounds like a windows issue. Are you allocating and releasing/resizing memory on each frame? Maybe the stalling comes from paging or windows cleaning up fragmented virtual memory?

And as always: if you’re on a dual core machine with Geforce graphics, try to deactivate the “threaded optimization” in the graphics driver. (“Threaded-Optimierung” auf deutsch. :wink: )


Hi there!
Thank you, it seems that these threaded optimizations really caused these glitches, at least I didnt notice them happening anymore after turning TO off. They were somewhat unpredictable though, so it might as well be luck.
I am not (manually) allocating any heap memory on a frame base, so that couldn’t have been the reason… Yes I’m using virtual funtions a lot, also boost::intrusive_ptr’s and shared_ptr’s, however their contribution to the frame-time is negligable and pretty stable (at least according to the profiler).

Thank you again,

Danke :wink: Ich habe erst seit einem Monat meine allererste nVidia-Grafikkarte :wink:

Glad to help, but the downside is: there’s no other solution than to deactivate that option in the driver (which is enabled by default).

Have a look here.


This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.