moderated >> persistent Tree::Trie object

by duibhce kaelann » Sun, 09 Oct 2005 00:27:21 GMT

Hi all,

I'm struggling a bit with a performance issue. I've written a set of Perl
scripts to do some basic Natural Language Processing and in one of the
scripts I'm relying on Tree::Trie to quickly search a large list of words..

Well actually, I'm using Tree::Trie to create 3 different objects
containing tries of 3 different large lists of words (+100.000 words each).
The problem is that I run the script quite often and it takes some time to
read in the 3 lists of words and build the tries on every run.

I would like to be able to just build the tries once, and then reuse them
on different runs. Could I use something like Data::Dumper to do this? If
so, how would I go about reloading the dumped tries in such a way that i
could approach them in the same way as I would approach a real Tree::Trie
object?

Or are there better ways to achieve this?
I realize I could start a daemon that would keep the Tries in memory but I
would prefer to avoid such a setup.

thanks in advance,
dK

Similar Threads

1. Web Framework with stateful sessions / persistent object space?

Not sure if the subject is fitting, but I couldn't think of anything
else. I am looking for a web framework in Perl that lets me cache
global objects that I can access from anywhere within the perl code
that is being called upon a new request.

Basically I want to use this to set up central object stores, Database
connection caches, etc. The framework should also support session
management.

Can anybody recommend something like this?

2. ANNOUNCE: Initial release of OOPS - Object Oriented Persistent Store