[XML-SIG] fast dump/restore of an XML document?

Anthony Baxter Anthony Baxter <anthony@interlink.com.au>
Tue, 16 May 2000 22:01:01 +1000


>>> Lars Marius Garshol wrote
> Marshal can basically store/load anything except object instances.
> So lists, dictionaries and so on are possible, but not objects.

That's what I was thinking - so to marshal, you'd have to convert it
to a structure of lists and dictionaries. I was just curious if there
was some secret protocol an object can use to marshal itself (there
didn't seem to be in Python/marshal.c)

> <URL: http://www.python.org/doc/current/lib/module-marshal.html >
> Marshal is, I think, much faster than pickle, so it's certainly worth
> a try. 

Only if it's not more expensive to convert it into a marshallable form.

> What I've been wondering is why you want to do this, though. Why not
> use some kind of database system with the possibility to export to and
> import from XML?

speed - loading up a document with multiple megabytes of XML and thousands 
of nodes is horribly slow. Unfortunately, pickling them is even slower :/

I think I'm just going to have to build my own wierd structures and wrap a 
DOM or something on top of them.

Anthony