On Thu, Apr 28, 2005 at 09:40:43AM +0200, Aleksander �hrn wrote:
> Hi,
> 
> I have a small search application where XML gets indexed, and where one at 
> query-time may pull out any snippet from the XML using XPath. As part of this 
> process I currently invoke xmlParsememory/2 at query-time in order to get an 
> xmlDocPtr I can work with. A nice optimization would be to do the parsing at 
> indexing-time, and at query-time just read in the binary xmlDocPtr object. Is 
> there a recommended way on how to achieve this? Any prior art I could take a 
> look at?
> 
> Tried searching the mailing list archives but all I found was a general 
> discussion thread about wbxml, nothing very concrete. Any pointers are much 
> appreciated.

  What makes you think saving to a binary and loading from a binary would gain
much efficiency. Right now parsing an in-memory XML string with libxml2 is 
close to 2 times faster than trying to copy the same preparsed xmlDocPtr
subtree.

Daniel

-- 
Daniel Veillard      | Red Hat Desktop team http://redhat.com/
[EMAIL PROTECTED]  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml

Reply via email to