Re: [xslt] Bug Fix doubles the XSL preprocessing time

>    Very simple. If the xmlXPathContext structures
> changes libxslt
> would likely *crash* because it relied on the size
> of the structure
> it was compiled against, and not the size expected
> by the used libxml2
> version

Ok I get it. 

>    The suggested fix is not acceptable as this
> create the bug again.
> You could try to force the reuse of the same
> xmlXPathContextPtr for
> all the compilations instead of reallocating a new
> one each time,
> that could work, but the current patch is not
> acceptable.

I'd like to submit a patch but I want to make sure
that my solution is acceptable.

1/ Add a dummy xmlXPathContextPtr to the stylesheet
structure and initialize it once with
xmlXPathNewContext when creating the stylsheet

2/ Reuse that structure each time when compiling
XPaths (is that safe?)

3/ Free the structure when freeing the stylesheet

I don't want to create a global to avoid having to
lock it...

Let me know if that's acceptable.


Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

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