szabgab / CPAN-Digger

CPAN Digger to analyze CPAN modules and other Perl-based applications
https://cpan-digger.perlmaven.com/
7 stars 3 forks source link

Reduce the time spent generating the per distribution pages #32

Closed szabgab closed 1 year ago

szabgab commented 1 year ago

I ran it once on my computer where it took about 1 hour since the runtime dependency mapping was introduced. Here is the output from the time command

real   51m2.319s
user  49m19.206s
sys    0m49.412s

Based on this I think I can be quite sure that the majority of the time was spent on building the dependency lists.

This could be improved a lot by memoizing (caching) the results of the function call get_dependencies. Are there other ways to improve the speed?

szabgab commented 1 year ago

It is down to 11 minutes now. Much better.

szabgab commented 1 year ago

The new results look like this

real   12m43.542s
user  12m19.906s
sys   0m15.482s

It seems that most of the user time is spent by Template Toolkit and not calculating the dependencies.