GNOME Bugzilla – Bug 163497
XInclude extremely slow
Last modified: 2021-07-05 11:01:23 UTC
When converting a docbook manual with 54 separate files from entity refs to using XInclude to pull in the files, I noticed XSLT processing slowed down enormously. After converting only 17 files, processing took 2:33, where it was only 5 seconds before. All included files have a docbook declaration. DV suggested on IRC that perhaps this could be streamlined by re-using the parent document's in-memory DTD representation, thus avoiding the need to parse and release the DTD over and over again for every included file. This really warrants fixing, as XInclude is arguably not useful with any serious sized project in this state.
I've been nailed by this one before: http://www.whump.com/moreLikeThis/link/03815. If you're not using a catalog, XSLT will fetch those DocBook DTDs. The solution is to create a local catalog. Try that and see if your transforms run faster.
there is more than that, DocBook DTD is a beast, and parsing it over and over and over can take a lot of time... Sharing preparsed DTDs when possible is a significant XInclude improvement. Not sure when I will have time to do this. Daniel
(In reply to Daniel Veillard from comment #2) > there is more than that, DocBook DTD is a beast, and parsing it over and > over and over can take a lot of time... Sharing preparsed DTDs when possible > is a significant XInclude improvement. Not sure when I will have time to do > this. > > Daniel If you don't have time to do it, any hints for someone else who might want to go about trying to fix it who does have the time?
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/libxslt/-/issues/ Thank you for your understanding and your help.