Skip Menu |

This queue is for tickets about the CPANPLUS CPAN distribution.

Report information
The Basics
Id: 4724
Status: resolved
Priority: 0/
Queue: CPANPLUS

People
Owner: Nobody in particular
Requestors: perl [...] crystalflame.net
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in:
  • 0.045
  • 0.046
  • 0.047
  • 0.048
Fixed in: (no value)



Subject: Unnecessarily writing .stored files that are already up-to-date
As shown by the log below (and confirmed against 0.048), CPANPLUS is writing the Storable datafiles every time they're loaded, regardless of whether any indexes are reloaded or not. IF (a) the indexes are loaded from .stored AND (b) the indexes are not modified in memory, there's no need to write them out on each exit. By not doing this extra write (especially on slow machines), CPANPLUS appears to be much faster. coral@cay:~/work/ > cpanp CPANPLUS::Shell::Default -- CPAN exploration and modules installation (v0.03) *** Please report bugs to <cpanplus-bugs@lists.sourceforge.net>. *** Using CPANPLUS::Backend v0.045. ReadLine support enabled. CPAN Terminal> m ^UNIVERSAL::foo Checking if source files are up to date Retrieving /Users/coral/.cpanplus/mailrc.2.08.stored Retrieving /Users/coral/.cpanplus/dslip.2.08.stored Retrieving /Users/coral/.cpanplus/packages.2.08.stored Your search generated no results CPAN Terminal> quit Exiting CPANPLUS shell Writing state information back to disk. This may take a little while.
Date: Sat, 20 Dec 2003 03:39:24 -0800 (PST)
From: "Jos I. Boumans" <kane [...] dwim.org>
To: Guest via RT <bug-CPANPLUS [...] rt.cpan.org>
Subject: Re: [cpan #4724] Unnecessarily writing .stored files that are already up-to-date
RT-Send-Cc:
On Fri, 19 Dec 2003, Guest via RT wrote: Show quoted text
> As shown by the log below (and confirmed against 0.048), CPANPLUS is writing the Storable datafiles every time they're loaded, regardless of whether any indexes are reloaded or not. IF (a) the indexes are loaded from .stored AND (b) the indexes are not modified in memory, there's no need to write them out on each exit. By not doing this extra write (especially on slow machines), CPANPLUS appears to be much faster.
yes, although thats true, its meant to be that way -- afaik it's kind of hard to see wether the structure has been modified in memory, and therefor knowing if you have to write the storable files to disk or not... of course there are ways, but none seem faster than just writing them... suggestions welcome of course -jos