in reply to Re: CPAN module install really slow
in thread CPAN module install really slow

Hi marto

I have now installed cpanm and its lightning fast as I would expect. Have no idea what, where or how to configure things to get CPAN working as I would expect but guess I can continue to use cpanm.

Thanks

Replies are listed 'Best First'.
Re^3: CPAN module install really slow
by marto (Cardinal) on Jul 13, 2015 at 12:42 UTC

    Within a cpan session o conf will display the current configuration. I mentioned previously the CPAN::SQLite config change, or you could compare settings across systems, though if you're happy with cpanm I'm pretty sure you'll stick with it.

Re^3: CPAN module install really slow
by gsee (Acolyte) on Jul 13, 2015 at 12:51 UTC

    I think I spoke too soon.

    It appears to be the Makefile.PL that is taking ages and for every module install?

    ps -ef | grep cpanm admtst 10665 18671 0 13:01 pts/1 00:00:00 /opt/app/release/perl/li +nux/5.18.2-7/bin/perl 5.18.2-7/bin/cpanm --verbose LWP::UserAgent pstree -pa 10665 cpanm,10665 5.18.2-7/bin/cpanm --verbose LWP::UserAgent `-perl,11170 Makefile.PL
    Yes if I do manual install of any of these modules it pretty instant.

      Are you sure you're comparing the same things here? Using a tool like cpan/cpanm installs dependencies, running perl Makefile.PL does not. LWP::UserAgent has many dependencies.

        Yes, the manual install lets you know the dependencies, I then download those and install them. The manual process to get all dependencies, gunzip - untar - build - test - install is still faster than cpanm doing it.

        Also, I have been using cpanm --verbose which shows the install of each dependency, it gets 'stuck' at the same place for each dependency as well.

      Some further information which may help someone help me!

      If I run the cpanm command with strace, I get the following output:

      ...... ...... open("/home/admtst/.cpanm/work/1436872577.16214/build.log", O_WRONLY|O +_CREAT|O_APPEND, 0666) = 4 lseek(4, 0, SEEK_END) = 2506 ioctl(4, SNDCTL_TMR_TIMEBASE or TCGETS, 0x7fffd6360540) = -1 ENOTTY (I +nappropriate ioctl for device) lseek(4, 0, SEEK_CUR) = 2506 fstat(4, {st_mode=S_IFREG|0644, st_size=2506, ...}) = 0 fcntl(4, F_SETFD, FD_CLOEXEC) = 0 write(4, "Configuring Email-MIME-ContentTy"..., 41) = 41 close(4) = 0 stat("cpanfile", 0x7651a0) = -1 ENOENT (No such file or d +irectory) stat("Build.PL", 0x7651a0) = -1 ENOENT (No such file or d +irectory) stat("Makefile.PL", {st_mode=S_IFREG|0644, st_size=1327, ...}) = 0 write(2, "Running Makefile.PL\n", 20Running Makefile.PL ) = 20 open("/home/admtst/.cpanm/work/1436872577.16214/build.log", O_WRONLY|O +_CREAT|O_APPEND, 0666) = 4 lseek(4, 0, SEEK_END) = 2547 ioctl(4, SNDCTL_TMR_TIMEBASE or TCGETS, 0x7fffd6360540) = -1 ENOTTY (I +nappropriate ioctl for device) lseek(4, 0, SEEK_CUR) = 2547 fstat(4, {st_mode=S_IFREG|0644, st_size=2547, ...}) = 0 fcntl(4, F_SETFD, FD_CLOEXEC) = 0 write(4, "Running Makefile.PL\n", 20) = 20 close(4) = 0 write(1, "Configuring Email-MIME-ContentTy"..., 45Configuring Email-MI +ME-ContentType-1.018 ... ) = 45 rt_sigprocmask(SIG_SETMASK, ~[RTMIN RT_1], [], 8) = 0 clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIG +CHLD, child_tidptr=0x7f74c45de9d0) = 16777 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 wait4(16777, Checking if your kit is complete... Looks good
      It has a wait command which I am unsure about, any ideas?

        strace -f should show child processes, too.
        لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ