Steffen Mueller <nj88ud...@sneakemail.com> writes: > Hi Tom, > > Tom Koelman wrote: >> I recently upgraded Module::ScanDeps from 0.89 to 0.90 and noticed a big >> hit in performance. For me (Windows XP, Strawberry Perl) the following >> command: >> >> scandeps -e "use DateTime" >> >> takes about 17 seconds with Module::ScanDeps 0.89 and about 306 seconds >> with Module::ScanDeps 0.90. >> >> Commenting out line 262 ( 'DateTime/Locale.pm' => 'sub', ) gives me back >> my original scanning time. >> >> I added some debug statements, which show me that scanning takes close >> to a second for every single Locale in DateTime. There's 469 Locales >> there now, hence the wait. >> >> Is there some way in which I can speed up this process? > > Yes. The easy way is to install the newest version of Module.:ScanDeps > from CPAN and use the dependency caching. That means you will only > have to bear with the slow DateTime::Locale scanning once. > > Conceptually, if we know the locales don't add any extra dependencies, > we could possible add a special case to prevent it from even trying to > scan the locale .pm files and just add them to the list of > dependencies instead. For lack of time, I can only say: Patches > welcome!
Hi Steffen, thanks for the suggestion. Yes, I took a look at dependency caching but that didn't seem to speed up my process significantly. I am currently looking into the code to understand where the slowdown originates exactly, but must admit to having difficulties understanding what's it's doing exactly at all. Currently I determined that _add_info gets called a lot and takes a lot of time in total. If time permits I'll take a more thorough look at it tomorrow. Tom