On Jun 9, 2008, at 6:34 PM, Gamaliel Masters wrote:
> A little spelunking in WinPDB shows that the resize / resize / paint
> block that is chewing up so much time seems to be coming from
> wxWindows. Tracing through the loop, you end up in
> dPemMixin.__onWxResize() and dPemMixin.__onWxPaint. The first resize
> call is sent an evt.Size of 197, 346, the second call is evt.Size
> 197,21. Then comes a call to __onWxPaint, then rinse & repeat.
>
> I have no idea if the Dabo system is somehow causing this loop, or
> if it
> is something to do with wx. I am currently running wxPython version
> 2.8.7.1 wxMSW (Unicode). The appears to be the current release version
> of wxPython.
It seems to be a Windows-level wxPython thing. I traced it down to
the code that defines the choices for the list controls, which has to
clear the current set of choices, and then does a single AppendItems()
call. On Windows, it seems that both of these calls causes a Paint and
Resize event to fire for every item in the list. So replacing a 20-
item list with a a 15-item list would cause 20 paint/resize events for
the clear(), and 15 for the appending. These events seem to be the
cause of the slowdown.
I've added display locking to the underlying _setChoices() method,
and it seems to eliminate the unnecessary events. Please try with the
latest Subversion code and let me know if you see an improvement, and
if that improvement is enough to make it usable, or if we need to do
more.
-- Ed Leafe
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]