]> Pileus Git - ~andy/gtk/commit
Bug 588273 - Make number of validated rows depend on time, not row count
authorBenjamin Otte <otte@gnome.org>
Fri, 10 Jul 2009 08:51:39 +0000 (10:51 +0200)
committerBenjamin Otte <otte@gnome.org>
Fri, 17 Jul 2009 19:35:32 +0000 (21:35 +0200)
commit33ada9e9384390f1381f0b3563d5e1752e0ff3fa
treec3bc619980352e71d3d1f1fe731c622821d82292
parent74ca4e24827619428a375904312dc8ba39e8d4a8
Bug 588273 - Make number of validated rows depend on time, not row count

Previously, do_validate_rows() validated 300 rows per iteration. While
this is usually not problematic, as the typical tree view contains less
than 100 rows. Tree views with a lot of columns or complex cell
renderers could take inacceptably long, like:
- Epiphany's location bar entry completion has multiline and marked up
  text in every cell. Validating a single row took ~1.5ms here.
- In the list view in Nautilus, When enabling all columns, validating a
  single row would take ~3ms.
With 300 rows per iteration, that made those examples take 500ms/1s in a
signle main loop callback, and this obviously caused responsiveness
problems.

Now the code uses a timer and limits the time for validating rows to
30ms. This can cause less lines to be invalidated per call, so the
function might be called more often, but generally results in more
responsive applications.
gtk/gtktreeview.c