GNOME Bugzilla – Bug 135390
repeated reads of same file
Last modified: 2021-07-05 13:25:41 UTC
I'm currently writing a document using DocBook, and have decided to seperate the chapters using XInclude. Thus the main file looks like this: <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "file:///vol/xml/share/schemas/dtds/docbook-4.2/docbookx.dtd"> ... <xi:include href="chap-intro.xml"/> <xi:include href="chap-control.xml"/> ... Each chapter is a complete XML document starting with <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "file:///vol/xml/share/schemas/dtds/docbook-4.2/docbookx.dtd"> I have a catalog file that maps the public identifiers to appropriate places in the filesystem, the same as used as system identifers. Processing this file with xsltproc takes longer than necessary, because for every x-included file, all docbook files (DTD modules, entity definitions) are read over and over again (I've decided not to include the lenghty truss output). I saw 260 "open" operations for 26 different files, counting only those associated with the DocBook DTD. I have one master document and 9 chapters, therefor the 1:10 ratio. More chapters or a finer seperation of the files would yield even worse values. I think libxml2 and depending tools could benefit from some sort of caching mechanism, so that each file is read only once. Joern
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/libxml2/-/issues/ Thank you for your understanding and your help.