…when running “Debug” builds versus “Release”!!!
I’ll bite. Vinn, I don’t know if this is the same problem you are having, but I definitely have slow rendering while debugging.
The extra debugging code in Juce is just not efficient for some cases. It slows my program down by a factor of 5 depending on how much data I have on the screen. Now my program is different than most written in Juce because I have a ton of single character drawing calls (sometimes over a thousand drawSingleLineText calls in one render) and of course each one calls the debugging code to check for unicode and other stuff which slows it down. I actually have to run with debug off to test a lot of code because of this. A while back I asked Jules if there was a way of turning off the debug stuff for text drawing and he said there is now way, but I could go in a comment out all the debugging code in the text routines. Not exactly the answer I was hoping for. It would be nice if Jules would look into improving this, especially if you could set a switch to turn off the unnecessary debugging code that slows the rendering.
BTW, with Visual Studio I saw very, very little speed loss when debugging.
Jules, would it be possible to add a call like
Graphics::drawCharAt( int x, int y, Byte character ) This would probably double the speed of my rendering in both debugging and release mode.
Yeesh. You should put them all in a GlyphArrangement instead, and then draw it.
It was never my intention for this to become a useful thread but those crafty humans always find a way…
Thank you and that would work but I don’t know if I want to rewrite my code just to get around debugging sluggishness. Although, I may try it some rainy day.
The funny thing is, to my amazement, the drawing speed in release mode is very fast, even with the double buffering. So the question is for me: Is it worth it, just for debugging?
There’s no point rewriting anything just for debugging, but using a GlyphArrangement would be vastly more efficient in release too.
I would just remove the debugging tests in your local copy of Juce if it would slow down massively in debug mode, or add your own define to toggle it on or of. If it speeds up your work flow why not.