in reply to Tie Hash
I'm not sure I understand your objection to pre-loading the databases. If you want to improve on startup time over in-memory hashes, then you're going to have to have the data somewhere else first, which means you have to pre-load the data.
If you aren't doing that, then you are populating your data to memory first before it gets put into your hashes, and you aren't getting an initial startup time benefit. That's okay, since you'll get the benefit on subsequent uses, but there's also no reason you couldn't implement such a solution using e.g. Tie::DBI rather than pre-loading the data. After all, a tied hash that you couldn't add to wouldn't be very useful.
In short, it seems all of your options are interchangable depending on how you implement them. The difference is in how you want to write your implementation.
Re^2: Tie Hash
by BioLion (Curate) on Nov 30, 2009 at 16:23 UTC
|
Sorry - maybe i didn't make that clear - Tie::DBI, ties your datastructure to a pre-existing database, i.e. you need to make that database first, then populate from your data. DBM::Deep you can just write and it will do all the creation for you. Once the *populated* database is created, I won't re-create it, for the reasons you pointed out!
As I said I am trying to learn more about databases, so if i am wrong, please correct me!
Just a something something...
| [reply] |
|