Windows 7/8 freezes when scrolling on a panel with hundreds of TxtCtr.

Hi all,

I have problems in using wxPython on Aero (windows 7/8) with is a large number of
TxtCtrl on the same panel.

I have joined code to reproduce the problem. Step to reproduce on windows
7:

  1.  Activate Aero if not
    

activated (for ex: Right click the Desktop>>Click Personalize>>Under
'Aero Themes’, click ‘Windows 7’).

  1. Launch LagW8.py

  2.  Scroll on panel
    

(preferentially with scroll button of the mouse)

ð DWM (Desktop Windows Manager) CPU usage grows suddenly and Windows freezes
for minutes.

  1.  Deactivate Aero (for ex: Right click the Desktop>>Click
    

Under 'Basic and High Contrast Themes’, click ‘Windows
7 Basic’)

  1. Scroll on panel

ð scroll works fine!

On windows 8, same behavior but aero cannot be deactivated.

  • Is there something in the joined code that can explain this behavior?

  • Did you have some workaround suggestions?

    I try currently to find information on the way to redraw only the displayed
    part of the panel; did you have information on that?

Thank you in advance,

APO

LagW8.py (4.92 KB)

Although it seems like a legitimate question–why should it freeze with too many textctrls? (and I don’t have the answer)–I have to always ask why people want to put hundreds of any object (but particularly textCtrls) on one screen. It just doesn’t seem like good UX at all. Maybe I’m missing something.

···

On Fri, Dec 20, 2013 at 11:58 AM, A PO apo131221@gmail.com wrote:

Hi all,

I have problems in using wxPython on Aero (windows 7/8) with is a large number of
TxtCtrl on the same panel.

I have joined code to reproduce the problem. Step to reproduce on windows
7:

  1.  Activate Aero if not
    

activated (for ex: Right click the Desktop>>Click Personalize>>Under
'Aero Themes’, click ‘Windows 7’).

  1. Launch LagW8.py
  2.  Scroll on panel
    

(preferentially with scroll button of the mouse)
ð DWM (Desktop Windows Manager) CPU usage grows suddenly and Windows freezes
for minutes.

  1.  Deactivate Aero (for ex: Right click the Desktop>>Click
    

Personalize>>Under 'Basic and High Contrast Themes’, click ‘Windows
7 Basic’)

  1. Scroll on panel
    ð scroll works fine!

On windows 8, same behavior but aero cannot be deactivated.

  • Is there something in the joined code that can explain this behavior?
  • Did you have some workaround suggestions?

I try currently to find information on the way to redraw only the displayed
part of the panel; did you have information on that?

Thank you in advance,

APO

You received this message because you are subscribed to the Google Groups “wxPython-users” group.

To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

C M wrote:

Although it seems like a legitimate question--why should it freeze with
too many textctrls?

Perhaps a better question is why shouldn't it freeze, or at least be very very slow? With 5 widgets per row in the sample code the system has to deal with 2500 widget handles, plus the overhead of 2500 instances of the C++ and Python classes, plus paint events and DCs and drawing of backgrounds, border lines and text for 100 or so widgets at a time as the window is scrolled or resized or damaged by other windows, plus data allocations for the values and fetching the values from memory, plus each of those 2500 widgets will be sending events like EVT_SIZE, EVT_TEXT, and several others, etc.

(and I don't have the answer)--I have to always ask
why people want to put hundreds of any object (but particularly
textCtrls) on one screen. It just doesn't seem like good UX at all.
Maybe I'm missing something.

If you listen very carefully you can hear the sample application crying and whimpering things like, "This is so hard, why didn't you use a wx.grid.Grid?" "Please, please, can I have a Grid? I won't ask for anything else ever." "If you really liked me you would upgrade your wxPython and use a DataViewCtrl."

:wink:

···

--
Robin Dunn
Software Craftsman