Re: [xslt] libxslt processor dump/load



On Fri, May 04, 2007 at 10:18:57AM +0930, Andrew Mason wrote:
>  A collegue and  went through and profiled the libxslt running our large 
> stylesheets and it seemed that it was doing alot of malloc calls, and it 
> spent the majority of time doing memory related things.The larger the 
> stylesheets the more time it spent doing that. Which i guess is a result of 
> it parsing an unknown sized document.

  There is a lot of allocations due to creating the DOM for the stylesheet
and then generating the parallel structures resulting from the compilation
process. That's why your OpenBSD run was way slower, I assume the memory
allocator has different characteristic from glibc one especially in threaded
setups (that's somthing I got fixed a few years ago on Linux).

> The time actually spent processing the document was insignificant.

  and that's why a "one stylesheet for all processings" doesn't make
much sense when you start to hit performance problems.

> I really appreciate your help. I think we will probably have to go back and 
> consider how / when we are doing the XSLT to  achieve better results. 
> 
> Even with small stylesheets (12k), it still creates a noticable req/s hit 
> though.
> 
> I know it's not an issue with libxslt, more how PHP interacts with apache , 
> but the currently the way this works is good in some (common) scenarios.
> I wasn't at all trying to imply that there was anything wrong with how libxslt 

  We never really tuned the compilation process, in all common scenarios 
it really wasn't the main problem, the opposite you prefer to spend time
at compilation to shave microseconds at transform time.

  There may be obvious performance problems at compilation time as a 
result, and digging a bit may exhibit low hanging fruits worth fixing though.

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/


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