AW: [xslt] Bug Fix doubles the XSL preprocessing time
- From: "Kasimier Buchcik" <k buchcik 4commerce de>
- To: <veillard redhat com>, "The Gnome XSLT library mailing-list" <xslt gnome org>
- Cc: Jerome Pesenti <jpesenti yahoo com>
- Subject: AW: [xslt] Bug Fix doubles the XSL preprocessing time
- Date: Wed, 12 Apr 2006 11:40:52 +0200
Hi,
> Im Auftrag von Daniel Veillard
> Gesendet: Dienstag, 11. April 2006 19:09
>
> On Tue, Apr 11, 2006 at 09:29:47AM -0700, Jerome Pesenti wrote:
[...]
> > > 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.
>
> okay,
>
> > 1/ Add a dummy xmlXPathContextPtr to the stylesheet
> > structure and initialize it once with
> > xmlXPathNewContext when creating the stylsheet
> > structure.
>
> yes something like that except it should go into a compilation
> context (which doesn't exist yet so in the style for now, yes).
>
> > 2/ Reuse that structure each time when compiling
> > XPaths (is that safe?)
>
> It's safe because an XPath compilation can't call the XSLT back.
> Just make sure you reinitialize the context fields if needed.
>
> > 3/ Free the structure when freeing the stylesheet
> > structure.
>
> yes
>
> > I don't want to create a global to avoid having to
> > lock it...
>
> definitely, that would be plain broken.
>
> thanks in advance :-)
This is great. I'm trying to refactor some of the parts related
to compilation. There's already a compilation context
on my side. So Jerome, if you could just wait a couple of
days: I'm debugging my changes and will be able to commit them
in the next few days; the changes will be IFDEFed out until
they are accepted as a sane way to go.
Regards,
Kasimier
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]