Thank you for the de-noobification.

Fortunately I can't see this having more than 50-100 features in a setting.

Whatever the problem is then, it's specific to that computer then. (1000 would probably take it 10 minutes)

-Jim Stapleton

----- Original Message ----- From: "Matt Newell" <[EMAIL PROTECTED]>
To: <[email protected]>; "Hans-Peter Jansen" <[EMAIL PROTECTED]>
Sent: Wednesday, January 10, 2007 7:57 PM
Subject: Re: [PyKDE] performance issues


On Wednesday 10 January 2007 15:52, Steven James Samuel Stapleton wrote:
Sure, I thought the size issue was more due to not wanting to deal with a
lot of code.

run the ItemGenerator.py script in the top level directory. I've actually
got a newer version with tooltips, but this one will do for the example,
especially since the file in question is a lot shorter (this one also
displays the behavior, I wrote the new stuff today).

Click the "add features" button, and a number of sets will be added to the
lower box equal to the number in the box next to "add feature" button.

the ui/components/feature_box.py file/class has the class that
holds/creates the sets (with the addBars() function), and the classes are
defined in the ui/components/feature_bars.py file/class.

http://www.thestapletons.org/jim/APPS.tar.bz2


Seems to me that it's the QTextEdit's that are taking the time to construct.
It takes about 28 seconds to create 1000 "features" - 7000 QTextEdits.  It
only takes about 3.5 seconds if i replace the QTextEdit's with simple
QWidgets.

I would suggest avoiding so many QTextEdits. You could use QLineEdits if you
don't need multiple lines, or avoid using widgets for the view by using a
QTreeView/QTreeWidget and have custom editting widgets when the user double
clicks to edit a row.

Also your hide/show functions are redundant. If you hide a qt widget all of it's children are hidden automatically, and will reappear when you show the widget. If you construct a widget with children and call show on it, all the
children are automatically shown.

Matt

_______________________________________________
PyKDE mailing list    [email protected]
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde


_______________________________________________
PyKDE mailing list    [email protected]
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Reply via email to