Problems? Is your data what you think it is? | |
PerlMonks |
Re^4: MCE: How to access variables globallyby biohisham (Priest) |
on Dec 21, 2021 at 06:27 UTC ( [id://11139790]=note: print w/replies, xml ) | Need Help?? |
I appreciate the comprehensive reply Marshall. I elaborated on the data and the actual code in one of the responses to this thread. The current project that is blowing the RAM is the smallest benchmark before scaling to the wider dataset and I can foresee issues with reading and retrieving despite MCE gettomg to the rescue (for now). Hence, I see the case for SQL/SQLite (which remained outside my toolbox since ages because of the bittersweet relationship I had with Oracle DBs). The next step is to statistically analyse the final data through R. I am kinda apprehensively curious about how R might take reading the file. In fact the DBM:Deep::Cookbook documents the slow performance Because DBM::Deep is a conncurrent datastore, every change is flushed to disk immediately and every read goes to disk. This means that DBM::Deep functions at the speed of disk (generally 10-20ms) vs. the speed of RAM (generally 50-70ns), or at least 150-200x slower than the comparable in-memory datastructure in Perl. There are several techniques you can use to speed up how DBM::Deep functions. Put it on a ramdisk The easiest and quickest mechanism to making DBM::Deep run faster is to create a ramdisk and locate the DBM::Deep file there. Doing this as an option may become a feature of DBM::Deep, assuming there is a good ramdisk wrapper on CPAN. Work at the tightest level possible It is much faster to assign the level of your db that you are working with to an intermediate variable than to re-look it up every time. Something or the other, a monk since 2009
In Section
Seekers of Perl Wisdom
|
|