Jump to content

  • Log In with Google      Sign In   
  • Create Account

how to spot a draw() function that gets slower and slower


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 lomateron   Members   -  Reputation: 363

Like
0Likes
Like

Posted 03 January 2014 - 07:53 AM

Hello I am having a problem in my application were the FPS go down as time passes, so to solve this problem I have to know which draw() is the slow one.

I asked before if I could measure the time a draw() takes with graphic diagnostics of VS2012 but the answer is a no, so I want to know if there is another way to spot that slow draw() in my code. 



Sponsor:

#2 Bacterius   Crossbones+   -  Reputation: 9304

Like
0Likes
Like

Posted 03 January 2014 - 08:56 AM

You could comment out the draw calls one by one and see for which one the program keeps slowing down. This will not work if the draw calls are not independent, of course.


The slowsort algorithm is a perfect illustration of the multiply and surrender paradigm, which is perhaps the single most important paradigm in the development of reluctant algorithms. The basic multiply and surrender strategy consists in replacing the problem at hand by two or more subproblems, each slightly simpler than the original, and continue multiplying subproblems and subsubproblems recursively in this fashion as long as possible. At some point the subproblems will all become so simple that their solution can no longer be postponed, and we will have to surrender. Experience shows that, in most cases, by the time this point is reached the total work will be substantially higher than what could have been wasted by a more direct approach.

 

- Pessimal Algorithms and Simplexity Analysis


#3 lomateron   Members   -  Reputation: 363

Like
0Likes
Like

Posted 03 January 2014 - 09:37 AM

I already know that is between 10 draws were the problem is, and they depend on each other so I can't do that



#4 Pink Horror   Members   -  Reputation: 1232

Like
1Likes
Like

Posted 03 January 2014 - 09:51 AM

Attach a profiler to your program near the start when FPS is good and save it. Then attach one after waiting for the FPS to get really bad and save that separately. Compare the two profiles.



#5 lomateron   Members   -  Reputation: 363

Like
0Likes
Like

Posted 03 January 2014 - 10:05 AM

ohhh "profiler", I didnt know that existed, I will try that






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS