> Your Mail works best with the New Yahoo Optimized IE8. Get it NOW!http://downloads.yahoo.com/in/internetexplorer/
1) Why are you setting the title of the frame repeatedly to the same
title?
2) Even if there is a valid reason (which I doubt), updating it faster
than the eye can see is not a good idea
-------------------
Mike Driscoll
is this a bug? or some deep reason behind it which I fail to
understand
On Mar 5, 2010, at 8:23 AM, anurag...@yahoo.com wrote:
> this is just a self contained example to show the problem.
> In real case, i only update title periodically on UPDATE_UI event e.g.
> when user modifies document I set title with '*'
> so I have workarounds but the question here is
>
> is this a bug? or some deep reason behind it which I fail to
> understand
It's a bug. Since the API for changing a control's label and a Frame's title are the same on Mac (for Carbon at least), the Frame code just calls wx.Window.SetLabel. SetLabel, though, calls Refresh() on the control, which makes sense for a wx.Window but is probably not necessary or useful for a Frame.
However, I'm surprised a Refresh() would grind your application to a halt. Are you using wx.BufferedPaintDC or doing drawing during a repaint using wx.ClientDC?
Regards,
Kevin
> --
> To unsubscribe, send email to wxPython-user...@googlegroups.com
> or visit http://groups.google.com/group/wxPython-users?hl=en
I will file a bug for this.
On Mar 5, 9:53 pm, Kevin Ollivier <kevin-li...@theolliviers.com>
wrote:
> Hi Anurag,
On Mar 5, 2010, at 6:45 PM, anurag...@yahoo.com wrote:
> Thanks Kevin, may be I exaggerated a bit :), its not halting but my
> render speed becomes too low on MAC e.g. on windows i have 32 FPS and
> on MAC 11 FPS(to user it seems moving widgets around is cumbersome),
> and yes i do drawing on memory dc and i have many custom controls,
> though as i said earlier I have fixed it for now by first checking if
> title really needs to be changed
> i thought internally wxFrame must be doing that.
>
> I will file a bug for this.
Yes, it is a bug, and I'll see about fixing it for trunk, but I suspect it's not the main cause of your performance problems, it just makes them more visible. If you're using wx.BufferedPaintDC or wx.MemoryDC to avoid flicker, don't. Use wx.AutoBufferedPaintDC instead, which only double-buffers on Windows because it happens internally on Mac and GTK. The Mac window manager protects against things like flicker itself, so a lot of the tricks developers use to get drawing working properly on Windows are unnecessary on Mac, and using them just hurts the performance of your app, sometimes a great deal.
Does the value of the title actually change that often? If not then you
can probably improve things a lot if you only call SetTitle when the
text actually needs to change.
if newTitle != self.GetTitle():
self.SetTitle(newTitle)
--
Robin Dunn
Software Craftsman
http://wxPython.org
On Mar 6, 12:59 pm, Robin Dunn <ro...@alldunn.com> wrote:
> On 3/5/10 12:23 AM,anuraguniyal wrote:
>
> > In awxPythonapplication, which i am porting toMacOSX, I set title of
> > appframeevery 500msec in update UI event, and due to that all the
> > panels and windows are refreshed.
>
> Does the value of the title actually change that often? If not then you
> can probably improve things a lot if you only callSetTitlewhen the