SFML community forums
Help => General => Topic started by: Qix on October 24, 2012, 05:10:21 am
-
Running my program is fine for a while; however, over a period of about 4-5 minutes it slows down almost to a halt and maxes out the CPU.
Did a little profiling and found this particular callstack to be the culprit:
(http://gyazo.com/d58be101bc29368616301b7e0ababebc.png?1351048076)
I'm not using the joystick at all. Why is this slowing down the program? It'd be easy if it was showing where my code was involved in this particular stack but it doesn't.
Any help?
-
Ah it seems the push/pop GL States call is doing this. Does that make any sense?
EDIT: Nope, nevermind. Still getting the bottleneck.
-
Code? Version of SFML?
-
I don't know which part of the code to post. :x the call stack shows no relevant part of my own code.
SFML 2.0, latest.
-
I don't know which part of the code to post. :x the call stack shows no relevant part of my own code.
Then the best thing to do now is to extract a complete and minimal code that reproduces the problem. Remove anything that doesn't make the problem disappear.
-
That will take me a while... I have almost 100 source files with hundreds of lines each.
I'll figure out where it's bottling up and I'll reply here.
-
Is this not related? http://en.sfml-dev.org/forums/index.php?topic=7907
-
Is this not related? http://en.sfml-dev.org/forums/index.php?topic=7907
This bug has been fixed.
-
Is this not related? http://en.sfml-dev.org/forums/index.php?topic=7907
This bug has been fixed.
Yea, it doesn't appear to be the same bug.
Laurent, is there a way to just disable SFML from using any sort of joystick functionality? I mean, in the source; this particular application wouldn't be using the joystick at all. It may not fix the problem, but it's worth a try.
-
You can comment out the call to Joystick::update (should be hidden under Window::pollEvent).
-
You can comment out the call to Joystick::update (should be hidden under Window::pollEvent).
Oh cool, I will do that!