Page 1 of 1

Delay (high CPU) after opening dialog

Posted: Sat Aug 09, 2014 12:42 am
by iwbnwif
I am not sure if this is a feature of wxWidgets or Codelite...

On Windows 8.1 (64 bit) and using Codelite version 6.0 there is a delay of several seconds after opening certain dialogs from the menu.

When this happens, CPU usage on 1 core goes to 100% and according to VerySleepy it is being caused by RegSetValueExW. It happens on at least these menus:

File->Open...
Workspace->New...
Workspace->Open...
Build->Configuration Manager...

So it isn't just built-in dialogs but custom ones too.

Note this does not happen with the tool bar buttons, only the menu entries.

I noticed it because I was having exactly the same problem with my application. It seems to be caused by having an ID of wxID_ANY for the menu entry, changing it to anything else and the problem disappears.

Re: Delay (high CPU) after opening dialog

Posted: Sat Aug 09, 2014 9:39 am
by eranif
I can't make it happen here (Windows 7.1)
Everything is opened instantly :/

Eran

Re: Delay (high CPU) after opening dialog

Posted: Sat Aug 09, 2014 12:37 pm
by iwbnwif
Thanks Erin,

Yes, it opens instantly but once the dialog is open there is a delay before it is possible to select anything in the dialog, or even move it by dragging the title bar.

I will leave a message on wx-dev because since I left the message here I found it is very simple to reproduce the same effect using the minimal example. I thought I should leave this information here just in case someone else has the same problem.

Code: Select all

Index: samples/minimal/minimal.cpp
===================================================================
--- samples/minimal/minimal.cpp (revision 76890)
+++ samples/minimal/minimal.cpp (working copy)
@@ -86,7 +86,7 @@
     // it is important for the id corresponding to the "About" command to have
     // this standard value as otherwise it won't be handled properly under Mac
     // (where it is special and put into the "Apple" menu)
-    Minimal_About = wxID_ABOUT
+    Minimal_About = wxID_ANY
 };

 // ----------------------------------------------------------------------------
Its very easy to fix by just changing wxID_ANY to something else.

Also its not just dialog related, if you select Help->Check for updates... in Codelite the same thing happens.

Re: Delay (high CPU) after opening dialog

Posted: Sat Aug 09, 2014 8:43 pm
by iwbnwif
This looks to be related to nVidia's nView utility.

See http://trac.wxwidgets.org/ticket/16409#comment:3 for details.