Skip Menu |

This queue is for tickets about the IO-Compress-Base CPAN distribution.

Report information
The Basics
Id: 34752
Status: resolved
Priority: 0/
Queue: IO-Compress-Base

People
Owner: Nobody in particular
Requestors: dmuey [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Smaller memory foot print fix up
Hello, Since the goal of this module is compression you might also be interested in a semi related savings: memory. The fact that Scalar::Util has (appx) a 656K require() footprint and a 668K use() footprint. I change IO::Compress to use a different module for IO::Compress::Base to give it blessed() and readonly() that has an appx 136K require footprint and 152K use footprint. (half MB of memory!) Would you consider patching IO::Compress to use the more memory efficient one? If so I'd be happy to package it up formally on CPAN for public use. It'd pass all of Scalar::Util's blessed() and readonly() tests, in fact it *is* Scalar::Util's functions just 'Splinter'ed out or 'Tiny'ied up. I'd probably leave out the Exporter (maybe do a non exporter import() w/ symbol table magic) stuff for further gain it'd be a require(0 for CU and memory savings then a full name space call to said functions.
On Mon Apr 07 18:15:53 2008, DMUEY wrote: Show quoted text
> Hello, > > Since the goal of this module is compression you might also be > interested in a semi related > savings: memory. > > The fact that Scalar::Util has (appx) a 656K require() footprint and a > 668K use() footprint. > > I change IO::Compress to use a different module for IO::Compress::Base > to give it blessed() > and readonly() that has an appx 136K require footprint and 152K use > footprint. (half MB of > memory!) > > Would you consider patching IO::Compress to use the more memory > efficient one? > > If so I'd be happy to package it up formally on CPAN for public use. > > It'd pass all of Scalar::Util's blessed() and readonly() tests, in > fact it *is* Scalar::Util's functions > just 'Splinter'ed out or 'Tiny'ied up. > > I'd probably leave out the Exporter (maybe do a non exporter import() > w/ symbol table > magic) stuff for further gain it'd be a require(0 for CU and memory > savings then a full name > space call to said functions.
Hello again Daniel Originally I used my own versions of blessed & readonly (which were straight copies of the code from Scalar::Util), but I moved to "use Scalar::Util" for a couple of reasons. Firstly Scalar::Util is now a core module, so new perl installations will already have that functionality available. Secondly, although Scalar::Util doesn't change that much, it does get modified from time to time. Using the standard module means I don't have to wory about keeping up with fixes to Scalar::Util. To be honest I blow hot & cold on the use of Scalar::Util. At the moment I'm happy to leave things the way they are. cheers Paul
From: dmuey [...] cpan.org
On Tue Apr 08 07:03:18 2008, PMQS wrote: Show quoted text
> On Mon Apr 07 18:15:53 2008, DMUEY wrote:
> > Hello, > > > > Since the goal of this module is compression you might also be > > interested in a semi related > > savings: memory. > > > > The fact that Scalar::Util has (appx) a 656K require() footprint and a > > 668K use() footprint. > > > > I change IO::Compress to use a different module for IO::Compress::Base > > to give it blessed() > > and readonly() that has an appx 136K require footprint and 152K use > > footprint. (half MB of > > memory!) > > > > Would you consider patching IO::Compress to use the more memory > > efficient one? > > > > If so I'd be happy to package it up formally on CPAN for public use. > > > > It'd pass all of Scalar::Util's blessed() and readonly() tests, in > > fact it *is* Scalar::Util's functions > > just 'Splinter'ed out or 'Tiny'ied up. > > > > I'd probably leave out the Exporter (maybe do a non exporter import() > > w/ symbol table > > magic) stuff for further gain it'd be a require(0 for CU and memory > > savings then a full name > > space call to said functions.
> > Hello again Daniel > > Originally I used my own versions of blessed & readonly (which were > straight copies of the code from Scalar::Util), but I moved to "use > Scalar::Util" for a couple of reasons. Firstly Scalar::Util is now a > core module, so new perl installations will already have that > functionality available. Secondly, although Scalar::Util doesn't change > that much, it does get modified from time to time. Using the standard > module means I don't have to wory about keeping up with fixes to > Scalar::Util. > > To be honest I blow hot & cold on the use of Scalar::Util. At the > moment I'm happy to leave things the way they are.
I completely understand. Makes total sense. Next time you're in a 'cold' mood let me know :) Thanks for your time, have a good one. -- Dan Muey