Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Strange bottleneck  (Read 4937 times)

0 Members and 1 Guest are viewing this topic.

Qix

  • Full Member
  • ***
  • Posts: 139
  • I am Qix!
    • View Profile
    • Natoga Technologies
Strange bottleneck
« 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:


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?
~ Qix
Creator of Rippl Studio
Code: [Select]
<danharibo> iostream: I don't do enough drugs to think that's a good idea.

Qix

  • Full Member
  • ***
  • Posts: 139
  • I am Qix!
    • View Profile
    • Natoga Technologies
Re: Strange bottleneck
« Reply #1 on: October 24, 2012, 05:14:34 am »
Ah it seems the push/pop GL States call is doing this. Does that make any sense?

EDIT: Nope, nevermind. Still getting the bottleneck.
« Last Edit: October 24, 2012, 05:32:34 am by Qix »
~ Qix
Creator of Rippl Studio
Code: [Select]
<danharibo> iostream: I don't do enough drugs to think that's a good idea.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Strange bottleneck
« Reply #2 on: October 24, 2012, 08:09:46 am »
Code? Version of SFML?
Laurent Gomila - SFML developer

Qix

  • Full Member
  • ***
  • Posts: 139
  • I am Qix!
    • View Profile
    • Natoga Technologies
Re: Strange bottleneck
« Reply #3 on: October 24, 2012, 09:46:23 am »
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.
~ Qix
Creator of Rippl Studio
Code: [Select]
<danharibo> iostream: I don't do enough drugs to think that's a good idea.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Strange bottleneck
« Reply #4 on: October 24, 2012, 09:48:43 am »
Quote
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.
Laurent Gomila - SFML developer

Qix

  • Full Member
  • ***
  • Posts: 139
  • I am Qix!
    • View Profile
    • Natoga Technologies
Re: Strange bottleneck
« Reply #5 on: October 25, 2012, 11:12:25 am »
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.
~ Qix
Creator of Rippl Studio
Code: [Select]
<danharibo> iostream: I don't do enough drugs to think that's a good idea.

Zephilinox

  • Newbie
  • *
  • Posts: 43
    • View Profile
Re: Strange bottleneck
« Reply #6 on: October 25, 2012, 06:45:53 pm »

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Strange bottleneck
« Reply #7 on: October 25, 2012, 07:55:26 pm »
Quote
Is this not related? http://en.sfml-dev.org/forums/index.php?topic=7907
This bug has been fixed.
Laurent Gomila - SFML developer

Qix

  • Full Member
  • ***
  • Posts: 139
  • I am Qix!
    • View Profile
    • Natoga Technologies
Re: Strange bottleneck
« Reply #8 on: October 26, 2012, 11:46:56 am »
Quote
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.
~ Qix
Creator of Rippl Studio
Code: [Select]
<danharibo> iostream: I don't do enough drugs to think that's a good idea.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Strange bottleneck
« Reply #9 on: October 26, 2012, 11:48:22 am »
You can comment out the call to Joystick::update (should be hidden under Window::pollEvent).
Laurent Gomila - SFML developer

Qix

  • Full Member
  • ***
  • Posts: 139
  • I am Qix!
    • View Profile
    • Natoga Technologies
Re: Strange bottleneck
« Reply #10 on: October 28, 2012, 02:51:04 am »
You can comment out the call to Joystick::update (should be hidden under Window::pollEvent).

Oh cool, I will do that!
~ Qix
Creator of Rippl Studio
Code: [Select]
<danharibo> iostream: I don't do enough drugs to think that's a good idea.

 

anything