Zim

Scrolling speed of the index can be improved

Bug #575277 reported by Henrik
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zim
Won't Fix
Low
Unassigned

Bug Description

In the Python-based version of Zim, scrolling the index with the scroll wheel is so slow that it's practically unusable on my Atom-based netbook. It's less of a problem but still noticeable on a Pentium 4. The old Perl-based version worked much better in this regard.

To reproduce: Use the scroll wheel to scroll vigorously up and down for a few seconds. The list will lag behind and keep scrolling for a while afterward.

My system:
* Zim 0.46
* Python 2.6.5
* GTK+ 2.20.0
* PyGTK 2.17.0
* Linux 2.6.33
* X.Org server 1.7.6

The following did not resolve the issue:
* Changing my GTK theme to the default.
* Putting the notebook on a RAM disk.
* Disabling compositing.

Henrik (putte-xvi)
summary: - Scrolling is extremely slow
+ Scrolling the index is extremely slow
Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote : Re: Scrolling the index is extremely slow

There is a difference in trade off between the two version in how much data is kept in memory. The perl version keeps all data in memory while the python requests it on the fly.

I found that the python version performs especially worse for large namespaces (so many notes without much hierarchy) and I have implemented some optimizations for that in the development tree since releasing 0.46. If you want to try this out, you can fetch the development branch with "bzr branch lp:zim".

How many notes do you approximately have in the top level of the notebook ?

Revision history for this message
Henrik (putte-xvi) wrote :

Ah, excellent, the development version is a big improvement. It's still slightly slower than the Perl version though. (Laggy scrolling when using the wheel, as opposed to using the scrollbar, seems to be a general issue in GTK+. I just noticed similar problems with the GtkTreeStore demo in gtk-demo.)

I have 158 pages and 13 folders at the top level.

Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote : Re: [Bug 575277] Re: Scrolling the index is extremely slow

On Tue, May 4, 2010 at 8:31 PM, Henrik <email address hidden> wrote:
> Ah, excellent, the development version is a big improvement. It's still
> slightly slower than the Perl version though. (Laggy scrolling when
> using the wheel, as opposed to using the scrollbar, seems to be a
> general issue in GTK+. I just noticed similar problems with the
> GtkTreeStore demo in gtk-demo.)
>
> I have 158 pages and 13 folders at the top level.

Hmm, that is not nearly as much as I would have expected to cause problems.

Do you feel performance is acceptable with the development version
from a usability point of view, or is further optimization needed ?

-- Jaap

Revision history for this message
Henrik (putte-xvi) wrote : Re: Scrolling the index is extremely slow

The development version is usable, but further optimization would be nice.

It feels like the page content is faster to scroll, even with several hundred lines of text, links, headings, etc. So it should theoretically be possible to get the same performance for a simple list, right? :)

Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :

Yes, if we load the whole index in memory it would scroll just as fast as the page. Problem is we can not predict up front what pages are visible in the treeview, since this is queried incremental. (Especially when multiple levels are expanded in the treeview, we can't be sure which will be needed during a scroll action.) Tried to make a reasonable caching that scales with respect to memory usage with reasonable speed. But admitted it may be not the best trade off for relative small notebooks.

Probably will need to investigate further refinement of caching algorithm. Maybe have the gui give feedback about the state of the visible treeview to the cache.

summary: - Scrolling the index is extremely slow
+ Scrolling speed of the index can be improved
Changed in zim:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :

One way for improvement is to have the index contain hints on what levels are expanded and adjust caching accordingly. This could be achieved by fixing bug #269042.

Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :

Closing this report for now as a "Won't Fix" as I don't think we will further improve scrolling speed any time soon. Tested on some low spec systems and behavior seems reasonable.

Changed in zim:
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.