jib / cpanplus-devel

11 stars 10 forks source link

Making CPANPLUS rebuilt its module tree faster (part 3) #5

Closed vpit closed 12 years ago

vpit commented 12 years ago

These commits try to speed up the generation of the module tree. It happens almost each time cpanp starts and takes almost 40 seconds on my not-too-old system (up to several minutes on my Eee PC). Analysis with Devel::NYTProf has shown that most of the time was spent in Params::Check::check(), Object::Accessor::can(), Object::Accessor::AUTOLOAD(), CPANPLUS::Configure::AUTOLOAD() and CPANPLUS::I::S::M::_add_module_object().

The killer change is commit b935c23b which saves about 15% of the build time just by itself.

This pull request is best applied in conjunction with the two others that I sent for Object::Accessor and Params::Check, but all three are technically independent.

When all changes to those three modules are applied, CPANPLUS rebuilds its module tree roughly 40% faster on my machine.

Vincent.