After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 336699 - Patch to cache omf file information
Patch to cache omf file information
Status: RESOLVED FIXED
Product: yelp
Classification: Applications
Component: General
git master
Other Linux
: Normal normal
: ---
Assigned To: Brent Smith (smitten)
Yelp maintainers
Depends on:
Blocks:
 
 
Reported: 2006-03-31 06:11 UTC by Brent Smith (smitten)
Modified: 2006-04-02 23:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
aforementioned patch (23.80 KB, patch)
2006-03-31 06:11 UTC, Brent Smith (smitten)
none Details | Review
updated patch (23.97 KB, patch)
2006-04-02 17:52 UTC, Brent Smith (smitten)
committed Details | Review

Description Brent Smith (smitten) 2006-03-31 06:11:05 UTC
This patch adds support for caching information from all the omf files in the scrollkeeper content list to ~/.gnome2/yelp.d/omfindex.xml.

This reduces disk I/O and CPU usage quite a bit since yelp must otherwise open all omf files, and create a xmlXPathContext for each and parse out information.

Care has been taken to recreate the cache file whenever the scrollkeeper content list is changed - that is, whenever the user rebuilds the scrollkeeper database.

This is an initial patch.  I still need to review it for memory leaks and clean up any debug messages before considering committing this.

I would like to get some feedback regarding the patch and whether it works for people or not.  Of course, I would also like to know if it provides a noticeable speed increase for people as well.

This should apply cleanly against HEAD as of 2006-03-30 11:00PM MST.
Comment 1 Brent Smith (smitten) 2006-03-31 06:11:44 UTC
Created attachment 62438 [details] [review]
aforementioned patch
Comment 2 Brent Smith (smitten) 2006-04-02 17:52:37 UTC
Created attachment 62618 [details] [review]
updated patch

additionally here are some benchmarks:

http://www.gnome.org/~bmsmith/before.png:
This is on first boot, before the cache file has been generated.  It can be seen from the highlighted lines that it takes around ~5 seconds to read in every omf file.

http://www.gnome.org/~bmsmith/after.png
This is on first boot, after the cache file has already been generated.  Here it only takes ~2 seconds to read in all the information from the cache file.

After the omf files are in the kernel i/o buffers the speedup is less significant between the two cases (having a cache file vs. having to read in all the omf files).  But I think the patch is still warranted as the startup time on first boot is pretty significantly improved (~3 seconds).
Comment 3 Brent Smith (smitten) 2006-04-02 23:15:21 UTC
committed.