pc2 has asked for the wisdom of the Perl Monks concerning the following question:
the file "hash.txt" is very large (28 MB), whose hash contains 385090 pairs of keys and values. thus, the "retrieve" command takes about 7 seconds to load the file. when we tested a "hash.txt" file with 58 MB, it took even longer (nearly 16 seconds) to load the hash from the file. of course, after loading the file, obtaining a value from the hash is very fast; the problem is the loading of the hash from "hash.txt". does anyone have some idea to speed up the loading of the hash? thank you in advance.#!c:/perl/bin/perl use Storable; %dict = %{retrieve("hash.txt")}; #retrieves the file into the hash %di +ct.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: storable: too slow retrieval of big file.
by Corion (Patriarch) on Jul 18, 2007 at 14:54 UTC | |
|
Re: storable: too slow retrieval of big file.
by Fletch (Bishop) on Jul 18, 2007 at 14:55 UTC | |
|
Re: storable: too slow retrieval of big file.
by BrowserUk (Patriarch) on Jul 18, 2007 at 15:21 UTC | |
|
Re: storable: too slow retrieval of big file.
by dave_the_m (Monsignor) on Jul 18, 2007 at 15:40 UTC | |
|
Re: storable: too slow retrieval of big file.
by almut (Canon) on Jul 18, 2007 at 16:57 UTC | |
|
Re: storable: too slow retrieval of big file.
by wfsp (Abbot) on Jul 18, 2007 at 15:09 UTC | |
|
Re: storable: too slow retrieval of big file.
by pc2 (Beadle) on Jul 20, 2007 at 23:36 UTC |