Re: [xml] performance of parsing docbook with xincludes



On 08/06/2018 03:45, Eric S. Eberhard wrote:
Some very simple things to do:  1) put the DTD hosts into the /etc/hosts file (or another if you like and substitute an IP)   2)  set /etc/resolv.conf to first look in the hosts file (before DNS)

The discussion is not about caching DTDs loaded over the network but from the local file system. In this particular case, the same Docbook DTD (~250 KB) is parsed more than 100 times for each XInclude.

If I was to suggest a speed up of libxml2 I would change it to allow optionally (probably at compile time) to never free memory -- each node, piece of data, etc that is created and destroyed constantly would just sit there (and slowly grow until it levels out).

libxml2 already allows you to use your own memory allocators. It's easy to make `free` a no-op.

Nick


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]