Bug 199171 - Performance of the TreeViews is slower
Summary: Performance of the TreeViews is slower
Alias: None
Product: Fedora
Classification: Fedora
Component: yumex   
(Show other bugs)
Version: rawhide
Hardware: All Linux
Target Milestone: ---
Assignee: Tim Lauridsen
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2006-07-17 18:10 UTC by Stewart Adam
Modified: 2007-11-30 22:11 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-08-10 08:20:57 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Stewart Adam 2006-07-17 18:10:27 UTC
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):

How reproducible:

Steps to Reproduce:
1. Refresh your repos
2. Click on 'Install' ( 'Remove', or 'Update' work, too, but it's best shown in
Actual results:
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!

Expected results:
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
to queue)

Additional info:
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!

Comment 1 Tim Lauridsen 2006-07-18 08:05:31 UTC
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.

Comment 2 Dawid Zamirski 2006-07-26 14:37:38 UTC

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.. :-(

Comment 3 Tim Lauridsen 2006-08-10 08:20:57 UTC
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.

Pass 1:
The packages are stored in yumex data structures.

Pass 2:
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.

Comment 4 Stewart Adam 2006-08-10 14:14:29 UTC
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:

/usr/lib/python2.4/site-packages/yum/config.py:454: DeprecationWarning:
getConfigOption() will go away in a future version of Yum.
Please access option values as attributes or using getattr().


Comment 5 Tim Lauridsen 2006-08-14 12:09:53 UTC
No need to report a bug for the DeprecationWarning, it is solved in the current
SVN version.

If you want look into the future, you can get a 1.1.1 pre-release here.

Note You need to log in before you can comment on or make changes to this bug.