Hi Christoph,
Ch Lamprecht wrote:
There are a lot of dependencies in my app therefore the packing takes some
minutes. Now I was making up my mind about the possibility to add a
dependencies
cache - most of the time my dependencies do not change - and just tried it.
It's a quick hack: uses Storable to store/retrieve state inside the
pack_manifest_hash method. However it works and I'd like to share it
here, maybe
as a feature suggestion rather than a patch...
That's a wonderful idea!
It speeds packing up from minutes to seconds in my case.
Btw sorry: Diff is against $VERSION = '0.982' I didn't check before I
started...
No worries. Thanks for diving into the guts of PAR::Packer to implement
the feature! My only criticism is that I somehow feel this would be
better put into Module::ScanDeps which does the actual dependency
checking. But I have no strong opinion on this. Maybe it's cleaner to
keep the functionality in PAR::Packer. What do others think?
Some random thoughts:
- Would it be better to have only one option "dependency-cache" which
will load the file if it exists and write it back to disk after the
packer is done scanning the files that aren't covered by the cache?
- Maybe use Storable's nstore() for portability of the dumped dependency
cache to other computers and perls.
Cheers,
Steffen