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 135390 - repeated reads of same file
repeated reads of same file
Status: RESOLVED OBSOLETE
Product: libxml2
Classification: Platform
Component: general
2.6.5
Other All
: Normal enhancement
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2004-02-25 14:40 UTC by joern
Modified: 2021-07-05 13:25 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement



Description joern 2004-02-25 14:40: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
Comment 1 GNOME Infrastructure Team 2021-07-05 13:25:41 UTC
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.