Hello everyone,
My monolith makescript maker/syntax file generator/auto FFI-bindings emitter/parser/preprocessor/inliner/someday to be compiler thingy has a lot of hashes, alright. Translation tables, symbol tables, keywords organized by loose cathegories, lots of cool stuff.
Now, the data actually in use by the program is generated from perl variables that are usually hases as well; because there's some processing of these I need to do at init time I thought just start saving these things to disk before it gets too big and actually slows down startup.
I'm doing that with store/retrieve and already have a mechanism in place to either load the file if it exists and no update is needed, else regenerate. This is done automatically on INIT blocks. Looks something like this:
my $result; INIT {load_cache('name',\$result,\&generator,@data)};
^slightly abbreviated for clarity, but you get the idea. Now, this is fine but it essentially means I need a separate file for each instance of some structure, which is undesirable in my case.
I'd much rather do this per-package, or a multitude of packages even, and it wouldn't really be too difficult to implement. So what's the question? There's no question. But I'd like to request some general advice on *local* databases, meaning my own computer: no cloud, no net, no servers no mambo, I save things to disk and no one else needs to know.
See, I can not duck for "Database" and not get flooded with absolutely irrelevant results about frameworks for whatever it is modern web developers and java mongers are concerned with. It's ridiculous and it's driving me crazy.
So... tips? Conventional wisdom? Pitfalls? What to watch out for? That kind of stuff. It might be mostly just things I already know but I'd rather hear them twice than never.
Just for context, I'm on a half-burned, half-dead one decade old model two core cpu and the bigger file in this scenario is like what, 64kb. Absolutely *gargantuan* quantities of data. But I'm interested in efficiently storing this program data uncompressed so that I don't end up with a million small files that need to be read individually at startup.
Cheers, lyeb.
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |