gnome-help-browser broblems



Hi!

Starting up the current version of `gnome-help-browser' is *really*
slow...  On a second run (i.e. with all the stuff in the disk cache)
it takes 7~8 seconds to come up on my system (Pentium 100MHz, 80M
RAM).  `kdehelp' needs only about 3 seconds.

I have looked at the source, and I found that this is due to the
`g_list_insert_sorted()' calls that are used to create the list of
available man/info/ghelp pages.  This is really overkill, as inserting
an element this way implies a linear search throughout the list.

As glib currently does not provide a standard list sorting function
(maybe I could implement it?), I have modified the `toc' loading
functions to use an array which is later sorted via `qsort()' and
finally transformed into a list.  Not very good-looking, but now it
takes only 2 seconds to come up: quite a difference.  :-)

There are other things I would like to see fixed (or fix myself) in
the help browser.  For example, why does it read a list of all the
man/info/ghelp files on startup?  Wouldn't it be much better to just
load them when required?  If I run the browser to ask for help about a
running GNOME applications, I most likely don't need to browse the
manual page list, so this is just wasted time.  Likewise, I think the
manpage index should not be as big; it should be split into separate
parts (also because updating it all is a bit slow).

Another weird thing is that when switching between pages it redraws
the window several times without any apparent reason, causing a lot of
ugly flickering.  I have not checked this out yet, but is it a problem
of XmHTML?

Btw, I think I have also found a bug in XmHTML.  If I start
`gnome-help-browser', click on "Man pages" and press PageDown 28
times, the "System Calls" header before the `_exit' manpage link is
not shown.

I have attached the patch for speeding up `gnome-help-browser' to this
mail.  I apologize if this is not the appropriate place for sending
patches.  I used a 98.09.18 snapshot of `gnome-core' from
http://gnome.jimpick.com/ to generate it.

I have also made a first try at a `GnomeAnimator' widget which can be
used to add animations to applications in an easy way (as suggested by
the `libgnomeui' TODO list).  Should I post it here as well?

-- 
Ettore

help-browser-speedup.diff.gz



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]