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

Дмитрий Федорук dfedoruk at gmail.com
Wed Apr 9 08:59:03 CEST 2008


Hi,
> It seems you only want to parse DTDs locally from disc, so setting
> "no_network=True" (which is the default in lxml 2.0) should prevent  
> any
> accidental remote access.
>
Eventually it turned out that I'm working fine without DTD. So,  
setting no_network = True and load_dtd = False really solved the  
problem. The parsing time is almost insignificant now.

To be frank, I find that out by accident. I encountered problems with  
machines carrying DTD and every parsing began to took 60 sec. I was  
very quick to disable DTD and feeled relief  to see it working and it  
working fast :)

Nevertheless, thanks for the advice!

If you're interested, here it goes:
http://beta.rambler.ru/srch?query=python+lxml&searchtype=web
This is a search engine frontend, xml\xslt based, everything is  
carried via lxml.

Cheers,
Dmitri


More information about the lxml-dev mailing list