Hi, 

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> On Behalf Of Daniel Veillard

> On Tue, Jul 04, 2006 at 01:33:02PM +0200, Buchcik, Kasimier wrote:
> > Hi,
> > 
> > Since Result Tree Fragments, which are xmlDoc
> > structures in Libxslt, are massively used, I would like
> > to add a cache to xsltTransformContext in order to
> > reuse the xmlDoc structures.
> > This would also avoid a lot of mutex locks: In xsltCreateRVT()
> > the string dictionary is assigned to the new doc and
> > xmlDictReference() is called, which does a xmlRMutexLock().
> 
>   Okay why not it's a reasonnable optimization. But I'm a bit
> surprized, a mutex lock/unlock should be on i386 architecture not
> much more expensive than an atomic test and set operation. If it
> really show up int the profile maybe the thread library aren't 
> really optimal.

I didn't profile the mutext behaviour, but I you're right; this is
rather a tiny pro argument, as the operation in-between the
lock/unlock is just: dict->ref_counter++;

> > Beside smoother creation of local variables, this would also
> > speed up the implementation of EXSLT: Result Tree Fragments
> > are created in the split() and tokenize() functions.
> 
>   Okay,

Regards,

Kasimier 
_______________________________________________
xslt mailing list, project page http://xmlsoft.org/XSLT/
[email protected]
http://mail.gnome.org/mailman/listinfo/xslt

Reply via email to