Re: findvalue is very slow
Vincent Lefevre <[email protected]>
| Newsgroups | gmane.comp.lang.perl.xml |
|---|---|
| Message-ID | <[email protected]> |
On 2008-05-23 17:06:28 +0200, Petr Pajas wrote: > At least two factors make your findvalue test much slower than the > others: 1st it employs the whole XPath machinery (creating context, > parsing the XPath expression, evaulating the XPath expression) > rather than simply askin for a struct value like the others, 2nd > looking at the implementation one discoveres that findvalue > involves several Perl subroutine calls, including creating an > object and then serializing it back. Surely, there is quite some > space for optimizing it ( patches that optimize but do not alter > the behavior are welcome). Thanks for the explanations. Could this slowness be documented? I thought that special code was generated at "compile" time or when the XPath expression (here constant) was seen for the first time, e.g. like regexp. This is what XSLT processors do, AFAIK. -- Vincent Lefèvre <[email protected]> - Web: <http://www.vinc17.org/> 100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/> Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon) _______________________________________________ Perl-XML mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs