alittlebitdifferent has asked for the wisdom of the Perl Monks concerning the following question:
However I am also interested on how you can make a hash of arrays memory efficient.
However this uses all my available memory and the program terminates.push @{ $eventHash {$EventScheduleReference} }, [@tmpxmlarray];
I have tried using the following to avoid RAM usage
However memory use seems to be the same and the program terminates. Also..interestingly when using strict refs...under a tie'd condition, an attempt to push to a duplicate key causes the following error:tie (%eventHash, 'DB_File', 'eventHash.db', O_CREAT|O_RDWR, 0644) || die ("Cannot open eventHash.db");
Any ideas on how to force the Hash onto Disk and/or use less RAM to store the hash of arrays? I assume I am only storing ARRAY references in the Hash and that the data in the arrays are still being stored semi-anomalously in RAM somewhere....although I can see the array data in the tie'd file...this might just be due to the way a tie uses random memory junk during file creation.Can't use string ("ARRAY(0x11614e8)") as an ARRAY ref while "strict re +fs" in use
|
|---|