newformat format change

Olivier Grisel ogrisel at nuxeo.com
Tue Oct 4 13:12:31 BST 2005


Martin Pool a écrit :

> I'm not sure it was such a good idea.  Reading and writing XML turns
> up as a hot spot in profiles, even though we're using a highly
> optimized xml library and the other code is not very optimized.  One
> part of the problem is that cElementTree needs to build everything
> into an in-memory structure which is then discarded; with a simple
> text form we can just convert directly.

cElementTree's iterparse function allow the developer to write push 
parsers that do not load the whole document in memory. This is really 
efficient and easy to use (much more than SAX):

http://effbot.org/zone/element-iterparse.htm

Best,

--
Olivier





More information about the bazaar mailing list