Delayed paint on resize


#1

I have a window that can expand or collapse with the push of a button. The button handler calls setSize() and I have defined resize() and paint() functions to reposition and draw components. The problem is that when I click the button, I see a blank window of the new size drawn, and then there is a significant delay (~1 second) before the components are drawn on the window. Is this normal? Is there anything to be done about it?

Thanks.


#2

No, doesn’t really sound normal… What OS is this?


#3

Windows. I have just added another button that opens a dialog box and there is an ~1 second delay between pushing the button and seeing the dialog box. So this is more of a general problem not related to resizing.

I’m new to Juce, so I may have made some simple mistake in configuring it or something.


#4

Here’s an update. We have this code building 4 ways: OSX, Linux, and Windows via ming and Visual Studio. The problem only occurs on the Visual Studio build. There are large delays between actions and when the screen is updated (e.g. between a button push and when a new window appears, etc). The same program built with ming for Windows runs fine.


#5

Perhaps you’re running the debug build? Our VC9 debug binaries are very slow.


#6

Putting it mildly. STL stuff in debug mode with VS2008 Express is positively painful.


#7

That was it. The release build runs fine. Thanks much.


#8

Just an update. We found a bug in our code that was causing the long delays. So for anyone reading this thread, don’t worry, Juce runs plenty fast even with the VS debug build if you don’t do something stupid. In our case the something stupid was re-loading and re-creating a typeface resource prior to printing every string.