Why is MenuBar item delayed in wxPython in Windows, while instant in OS X?

16 views
Skip to first unread message

Åke Kullenberg

unread,
Aug 19, 2011, 10:31:56 PM8/19/11
to wxpytho...@googlegroups.com
I posted this on StackOverflow earllier, but I guess this is a better place to get an answer.

Please refer to the attached stripped down example script. When I run this in OS X the menubar behaves exactly like you'd expect it to. In Windows however there is a noticeable lag (~4s on my 2GHz Core 2 Duo) of the rendering of the 'Slow' menu item. This doesn't feel right at all, to have an application show the good old (Not Responding) warning isn't exactly the behavior you'd expect after clicking around in a menu.

Has anyone run into this problem before? Am I doing something wrong on Windows side?

As far as versions go, I tested both with the latest stable, 2.8.12.1, and development, 2.9.2.1, and I am running Python 2.7 on Windows XP SP2 and Lion.
snippet.py

Robin Dunn

unread,
Aug 20, 2011, 2:09:12 PM8/20/11
to wxpytho...@googlegroups.com
On 8/19/11 7:31 PM, �ke Kullenberg wrote:
> I posted this on StackOverflow earllier, but I guess this is a better
> place to get an answer.
>
> Please refer to the attached stripped down example script. When I run
> this in OS X the menubar behaves exactly like you'd expect it to. In
> Windows however there is a noticeable lag (~4s on my 2GHz Core 2 Duo) of
> the rendering of the 'Slow' menu item. This doesn't feel right at all,
> to have an application show the good old (Not Responding) warning isn't
> exactly the behavior you'd expect after clicking around in a menu.
>
> Has anyone run into this problem before? Am I doing something wrong on
> Windows side?

It may just simply be that on Windows the system delays part of the
creation until it is needed for display, but on OSX it is all created up
front. I noticed that it took 20 - 24 seconds to run the
setup_slow_menu function, but on my Windows box it took only 4 seconds.
I had a slight delay when showing the menu on Windows (Win7) but not
as bad as yours. Perhaps this is something that MS has improved upon
since XP.

--
Robin Dunn
Software Craftsman
http://wxPython.org

c00kiemonster

unread,
Aug 20, 2011, 9:06:04 PM8/20/11
to wxPython-users
Yes there probably has been a fair share of improvement between Win7
and XP. As long as I am not doing anything wrong then I am fine.
Thanks for the help.
Reply all
Reply to author
Forward
0 new messages