Red Hat Bugzilla – Bug 199171
Performance of the TreeViews is slower
Last modified: 2007-11-30 17:11:38 EST
Description of problem:
When viewing the TreeViews, adding the rows is slow, esp. when adding the rows
for the 'Available' Treeview - Which can easily amount to 5000, 6000, even 9000
rows when using many repos. There is a PyGTK FAQ entry I came across that
perhaps could point to methods that would speed it up? (I'm guessing the
freeze/thaw and sorting would be the most useful)
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Refresh your repos
2. Click on 'Install' ( 'Remove', or 'Update' work, too, but it's best shown in
The CPU usage goes to 100% while rows are added, so the system stops being as
responsive as it should be, and on faster machines it should take a minute or
two, but on slower computers (800MHz and below) it takes a long time!
That the Treeview freezes and sorting is set to '-1' as the PyGTK FAQ shows so
that rows can be added quickly. Once done adding rows, then the Treeview should
thaw and set sorting to normal so that the user can work with the rows (eg, add
Especially with the new yumex version supporting yum 2.9.x, it's very fast and
useful apart from this - keep up the excellent work!
I am aware of the problems adding the rows to the treeview is very slow, it is
the mayor time consumer in yumex, it have tried some stuff from the PyGtk FAQ,
but it didn't improve the speed a lot.
I have tried to disconnect the Model from the view while adding data, it speed
up the adding, but then i get a long delay when reconnecting the model, for the
view has to sort the data in the view.
I have planned to do some testing of how to added data to the view in the
fastest way it is one of the mayor issues i will work on in yumex 1.1.x.
I have done some testing on the Yumex 1.0 branch in svn and the slowdown doesn't
seem to be caused by adding packages to the treeview itself. I have commented
out the line where the packages are being added to the treeview (in the "add"
method of yumexPackageList class) and the performance didn't improve much. It
looks like that each package is processed a few times before it gets added to
the tree and it takes the most of the CPU time - for every single package there
is always yumexPackage object created and this is where the slowdown occurs for
me. Unfortunately, I don't know how to solve it yet.. :-(
I have done some mayor changes to the current svn trunk verison of yumex (1.1.1).
I changed the ways packages are stored and handled internally in yumex.
I have split the package list creating in 2 passes.
The packages are stored in yumex data structures.
The packages are added to the TreeView.
Pass 2 is now done by a background thread, the update, install and remove view
first get selectable when all packages are added to the view.
I have also added a update only mode, so you only want to update the system,
then you can start yumex without showing and populating the instal and remove view.
Cool - Looking forward to the next release...
Also, I'm not sure if you'd like for me to report a seperate bug for this, but
when hitting 'refresh', this has been coming up ina terminal for a while now:
getConfigOption() will go away in a future version of Yum.
Please access option values as attributes or using getattr().
No need to report a bug for the DeprecationWarning, it is solved in the current
If you want look into the future, you can get a 1.1.1 pre-release here.