qexo-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qexo-general] Re: TreeList implementation


From: Per Bothner
Subject: Re: [Qexo-general] Re: TreeList implementation
Date: Wed, 25 Feb 2004 16:08:41 -0800
User-agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.6) Gecko/20040113

Joseph Coffland wrote:

The more I've looked around at Qexo the more I've realized that providing
an alternative to TreeList is not practical.  Much of the code depends on
AbstractSequence.

Yes.  Perhaps in a year I'll want to consider improving the data
structures, but for now a complete implementation of XQuery is
the main priority, and TreeList/NodeTree are at least acceptable.

BTW using a string table could improve TreeLists storage
requirements even further.

You mean for element/attribute names, or for text nodes?
ParsedXMLToConsumer does use a string table for element/attribute names.
Using a string table for attribute value or text nodes would be an
advantage in some applications; I don't know if it would make up
for the extra overhead of a string table.  It might be useful to
make it an option - just as it might be useful to provide an option
for creating indexes.

It seems that you could get fragmentation in the TreeList object array if deleting were possible. Then you might want maintain a freelist.

In a lot of ways memory management is much easier in C/C++.

You don't have garbage collection, but C++ destructors is a
very powerful tool, and you don't have to heap-allocate everything.
--
        --Per Bothner
address@hidden   http://per.bothner.com/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]