CC: | FAIDHERBE Thierry <thierry.faidherbe [...] forem.be>, "thierry.faidherbe [...] skynet.be" <thierry.faidherbe [...] skynet.be> |
Subject: | Creating DBM Files but not using them .... ? |
Date: | Thu, 16 Jul 2015 12:02:49 +0000 |
To: | "bug-DBM-Deep [...] rt.cpan.org" <bug-DBM-Deep [...] rt.cpan.org> |
From: | FAIDHERBE Thierry <thierry.faidherbe [...] forem.be> |
Hello,
I am the author of a rather big perl script (200K lines) that has
been coded for running on windows and unix (solaris, aix, hpux,
linux and former tru64 unix).
Code is going well, generating html pages, javascripts in html pages.
I am parsing data I collect from different CLIs and store them in
multi level hashes.
In some cases, I am nearly at 2GB mem limit so, avoiding it, I am
trying to find a way to use disk-based arrays. DBM::Deep seems to be
the best tool I can dream about, keeping my same hash syntax.
Currently, on my dev laptop, I am running perl 5, version 14,
subversion 2 (v5.14.2) built for MSWin32-x86-multi-thread
and DBM::Deep 2.12 .PM.
In my code, I (am trying to ) call
my $GANTT_DATE_FS = DBM::Deep->new( file => "GANTT_DATE_FS.DBM", type
=> DBM::Deep->TYPE_HASH)
or die "Can't initialize database: $!\n";
and I saw the GANTT_DATE_FS.DBM file is correctly created.
When I fill data in like using
$GANTT_DATE_FS{$client}->{$name}->{$DATE}->{$TIME}=$value;
the DBM file is not growing up and stay at 1KB.
So, I decided to reproduce it using smallest perl script being :
#!/usr/bin/perl
use DBM::Deep;
my $STORE_SSCREATE_SSCOMP = DBM::Deep->new("STORE_SSCREATE_SSCOMP.DBM" );
&mysub;
sub mysub{
my $i=0;
for ($i=0; $i<10000000; $i=$i+1){
$STORE_SSCREATE_SSCOMP->{"$i"}->{"$i"} = "new value";
}
}
... and this fill DBM file.
I looked everywhere I could to understand the reason but I am
completely clueless regarding it.
Do you have any idea about the reason of dbm files not being
filled in or where/which direction to look at ?
Hope you will be able to help me understanding the problem ;-)
Thanks in advance for your assistance and hoping to read you soon ...
Warm regards,
Cheers from Belgium,
Th
Kind regards - Bien cordialement - Vriendelijke groeten,
Thierry FAIDHERBE
Backup/Storage & System Management
LE FOREM
Département des Systèmes d'Information, Direction Infrastructure
Boulevard Tirou, 104 Tel: +32 (0)71/206730
B-6000 CHARLEROI Mobile: +32 (477)/995319
BELGIUM Mail : Thierry.faidherbe<at>forem.be
"The urgent is done, the impossible is being processed ... For miracles
Allow time".
"The future belongs to those who believe in the beauty of their dreams",
Eleanor Roosevelt
"Courage is not having the strength to go on; it is going on when you don't
have the strength.", Theodore Roosevelt
"Nowadays, people know the price of everything and the value of nothing",
Oscar Wilde
Message body not shown because it is not plain text.