Re: "Re: [xslt] Release of libxslt-1.1.3"



On Mon, Feb 16, 2004 at 06:04:26PM +0100, Kasimier Buchcik wrote:
> Hi,
> 
> on 2/16/2004 5:31 PM Daniel Veillard wrote:
> 
> >   There wasn't any release for nearly two months, here it is:
> >      ftp://xmlsoft.org/ and GNOME FTP mirrors
> >      http://xmlsoft.org/XSLT/
> > 
> >  The first part of the release is a number of bug fixed (thanks William),
> > the second part is a relatively consequent change where I started using and
> > sharing dictionnaries for most of the static strings involved in stylesheets
> > and transformation context, this offers a lot of potential performance
> 
> Great!
> 
> Does this produce result documents with dictionaries as well?

  Not yet, I just started touching the work of actually speeding up
the transformation using the dictionnaries. The current state is the
following:
   - when a stylesheet is compiled it tries to inherit its dictionnary
     (let's call it A) from the associated XML document.
   - all static strings are now extracted from that dictionnary
   - all XPath expressions are also using that dictionnary
   - when creating a new transformation, a subdictionnary reusing
     but in read-only mode the stylesheet dict is created (call it B)
   - there too all the constant strings are now extracted from B
     (so from A if they exist in A).
   - the documents created when processing the stylesheet use B
     but the strings are not yet allocated in them.

  So now there is an awful lot of string compare which can be optimized
as pointer comparison. Memory requirement should also be seriously
reduced (when compiling a DocBook stylesheet I counted 3200 reuses of
the base dictionnary A, tracking reference counting there is ... fun !)
The optimization fun is only beginning, 1.1.3 only set up the framework
for it.
  What I really really need is to know if 1.1.3 break things, like bindings
for PHP, Perl, C++, or other complex applications. It should not but since
the change are relatively large well you never know.
  Among the stuff to think about is time live of various object. Currently
the creation of B does not increase A reference counting, I expect the
stylesheet and the XSLT xmlDocPtr to not be freed while the transformation
occurs, however, if I make document resulting from the transformation
reuse B then that mean the stylesheet must not be freed until the resulting
document are freed too... otherwise I would have to use the thread support
in libxml2 to have the creation of B increase A refcount, and since all
this is supposed to work multithreaded I will have to make all refcounting
operation on dictionnaries work in mutual exclusion and I tried to avoid
that so far.
  But again the most crucial feedback I really need is if 1.1.3 actually
breaks things. There are other serious changes like the attribute value
template support has been completely revamped (should be really faster
now !).

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
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]