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 115289 - Speed up Yelp transformations
Speed up Yelp transformations
Status: RESOLVED FIXED
Product: yelp
Classification: Applications
Component: XSLT
git master
Other Linux
: High normal
: ---
Assigned To: Mikael Hallendal
Yelp maintainers
Depends on:
Blocks:
 
 
Reported: 2003-06-16 13:27 UTC by Shaun McCance
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Do prev/next linking in C instead of XSLT. (28.92 KB, patch)
2003-06-16 14:13 UTC, Shaun McCance
none Details | Review
Create prev/next in C, but fall back to XSLT when not in SK. (15.12 KB, patch)
2003-06-18 00:24 UTC, Shaun McCance
none Details | Review
Create navbar in C, fall back to XSLT if not in SK, and improve the XSLT navbar code. (24.59 KB, patch)
2003-06-19 17:08 UTC, Shaun McCance
none Details | Review
Generate navigation links in C (13.81 KB, patch)
2003-08-17 00:17 UTC, Shaun McCance
none Details | Review

Description Shaun McCance 2003-06-16 13:27:50 UTC
After tinkering quite a bit, I discovered that generating the Previous and
Next links on each chunk constitutes 70%-90% of the total transformation
time.  There's not a whole lot that can be done about this in XSLT, as XSLT
is not designed to be optimized.

However, Yelp knows what the previous and next links are from the
ScrollKeeper TOC files.  I'm attaching a patch that makes Yelp find the
Previous and Next links from ScrollKeeper, and insert the HTML into the
document when it presents it.

Taking this out of the XSLT results in significant speed improvements.  On
my machine (an 850 MHz), the System Administrator's guide went from ~16sec
to ~4sec, and the AisleRiot Manual went from a whopping ~40sec to ~4sec.
Comment 1 Shaun McCance 2003-06-16 14:13:52 UTC
Created attachment 17553 [details] [review]
Do prev/next linking in C instead of XSLT.
Comment 2 Shaun McCance 2003-06-16 14:16:05 UTC
I should also mention that this patch puts 'About This Document' and
'Contents' in the sidebar.  Doing this keeps the prev/next stuff from
having to do a bunch of special case stuff.  I've always wanted them
in the sidebar anyway.
Comment 3 Elijah Newren 2003-06-16 16:54:57 UTC
Adding PATCH and perf keywords and marking priority->high because of
the patch.
Comment 4 Eric Baudais 2003-06-17 18:45:19 UTC
This patch breaks the navigation links (Previous, Next, Contents) when
the help document is not registered with Scrollkeeper.  The navigation
links are not displayed by Yelp when the document is not registered
with Scrollkeeper.

I would like to see this patch improved so it doesn't break the
navigation links in documents not registered with scrollkeeper.
Comment 5 Shaun McCance 2003-06-18 00:24:01 UTC
Attaching an improved patch that falls back to creating the links in
XSLT when the document isn't in ScrollKeeper.
Comment 6 Shaun McCance 2003-06-18 00:24:56 UTC
Created attachment 17591 [details] [review]
Create prev/next in C, but fall back to XSLT when not in SK.
Comment 7 Eric Baudais 2003-06-18 15:54:04 UTC
I like the patch a lot now.  You can really see the difference when
you use the URI to view the doc (using a different location than where
Scrollkeeper expects) or when you view the same doc in Yelp.
Comment 8 Shaun McCance 2003-06-19 17:06:37 UTC
Attaching yet another, even more improved version.  This patch
improves the prev/next stuff in the stylesheets, speeding up the case
where the document is not in SK.  To recap:  Without any of these
patches, AisleRiot takes 40 sec on my machine.  With the patch I'm
about to submit, if AisleRiot is in SK, it takes 4 sec.  If it is not
in SK, it takes 20 sec.
Comment 9 Shaun McCance 2003-06-19 17:08:49 UTC
Created attachment 17628 [details] [review]
Create navbar in C, fall back to XSLT if not in SK, and improve the XSLT navbar code.
Comment 10 Mikael Hallendal 2003-06-24 16:50:56 UTC
I will take a look at this as soon as possible (hopefully today or
tomorrow).
Comment 11 Mikael Hallendal 2003-08-15 04:23:43 UTC
Shaun, I'm terribly sorry I haven't looked at this until now and now I
the stylesheet doesn't apply cleanly. 

Do you have an updated version of this patch? If so I'll take a look
at this today/tomorrow. Looks like an awesome patch from the timings
listed here.
Comment 12 Shaun McCance 2003-08-17 00:16:36 UTC
Attaching an updated version.
Comment 13 Shaun McCance 2003-08-17 00:17:19 UTC
Created attachment 19278 [details] [review]
Generate navigation links in C
Comment 14 Christian Rose 2003-08-20 18:14:38 UTC
Shouldn't the "Usage: " messages also be marked for translation?
Comment 15 Shaun McCance 2003-10-05 03:50:49 UTC
This went in on HEAD, and it very likely won't even matter with the
new XSLT.  Closing.