Re: thoughts on memory usage...

From: Michael O'Reilly <michael@dont-contact.us>
Date: 21 Aug 1997 14:23:47 +0800

Stewart Forster <slf@connect.com.au> writes:
>
> On other thoughts, you could implement a sort of tree whereby
> the '/' separated text in an URL are stored. The tree is traversed
> by finding the node at the '/' separation level, and the moving on
> to the next '/' separated node.

Well, I'd be inclined to complicate it slightly by splitting on '.'
and as well as '/' to get the most of the hostnames.

> This could also be done in a patricia tree style whereby you oly create
> the splits when necessary. All you need then to store is the index
> to the leaf node of the tree (and add the leaf node if it doesn't exist).
> Then provide a routine with builds the URL from the leaf node index. Add
> a little garbage collection management and you'd have it done.

This sound pretty nice. The only drawback I can see if that you
wouldn't get suffix compression (i.e. all the urls ending in '.html'
or even '/index.html' et al).

Michael
Received on Tue Jul 29 2003 - 13:15:42 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:11:24 MST