[lxml-dev] etree.parse hangs with a lot of parallel requests

Stefan Behnel stefan_ml at behnel.de
Wed Apr 16 20:46:27 CEST 2008


Hi,

Dmitri Fedoruk wrote:
> Which options do I have except of switching URL to a local path in
> SYSTEM definition? Setting up the DTD catalog on every machine that
> runs the application? The ideal option would be to tell the parser
> "load the given DTD from a given location(i.e. disk) and use it from
> now and on for parsing all incoming data", but is it possible?

You can use a custom resolver and cache the DTD (by its URL) once its loaded.

http://codespeak.net/lxml/resolvers.html

Stefan




More information about the lxml-dev mailing list