If you have a profiler like aqtime that can be remotely enabled and disabled try this.
- Have a flag that is ‘bprofileframe’ and set it to false by default
- Bind a keystroke to a function that toggles the flag on
- In your render loop, before rendering, if the flag is true, enable debugging
- At the end of the render loop, if the flag is true, set false, and disable debugging.
Voila! you have a keystroke that will capture a single frames profiling data and ONLY that frame, making for really easy profiling on very specific situations. Works a treat. Now I just need to work out how to make it all faster :D