Index - All Nodes - Edit - History - Log In


The plans for KekeCache


Here we briefly describe on our ideas on how to
improve XML parsing performance on embedded systems.

Problem statement

In many embedded linux projects we have found that parsing
of XML takes way too much time. Still we would like to
be able to use XML based standards and enjoy the flexibility
of XML.

Possible solutions




libxml2 cache

  • Easy to implement

  • General, helps all applications using libxml2

  • Enough performance improvment?

  • Must be profilied


  • Know to be effective

  • no runtime dependencies

  • Not Generic, requires applications to be written for it

  • Applications must be recompiled to change DTD

Cache File Structure Solutions

Solution Pros Cons
Binary representation of DOM-tree Faster loading for DOM-using programs Consumes more memory than callback-based approach
Store callbacks and arguments in binary:

  • start tag : arguments

  • character data

  • end tag

  • Compact file size

  • Faster for callback-using programs

If DOM-tree is needed, it must be constructed and slows down reading.

Open Issues

  • How to know when invalidate cache file?

    MD5 need to read trough whole file, inefective
    timestamp/size match timestamps unsure on an embedded device.
    No check, one who updates XML is responsible easy to implement, but might not be good in all situations.

    Simple check could be there, if requested. Should be possible to disable the check with an environment variable,
    since this is an application specific policy issue it should not be enforced by the library.

Chosen solution

- To be written


- To be written

Revision History
sabe - 4/11/05 - 02:57 pm
sabe - 4/11/05 - 02:49 pm
sabe - 4/11/05 - 01:42 pm