Brad Gilbert <b2gi...@gmail.com> wrote:
> For one it has the following line:
>
>     use lib 'lib';
>
> That is going to slow everything down if you have anything in the
> `lib` directory.
> The more things in that directory, the slower it will get.


I've been seeing some pretty slow perl6 one-line invocations,
where something like this might take 10 secs:

   perl6 -e'say "yellow"'

This evidently has to do with this perl alias I use that loads a module:

   alias perl6='perl6 -Mmethod-menu'

I do have a number of locations in my $PERL6LIB, and while they
could certainly be trimmed down, the sheer number of them don't
seem excessive to me (certainly not compared to my PERL5LIB):


  echo $PERL6LIB | tr ",", "\n"
  /home/doom/End/Cave/IntrospectP6/Wall/Object-Examine/lib/
  /home/doom/End/Cave/IntrospectP6/Wall/Augment-Util/lib
  /home/doom/End/Cave/IntrospectP6/Wall/Symbol-Scan/lib
  /home/doom/End/Cave/IntrospectP6/Wall/method-menu/lib
  /home/doom/End/Cave/IntrospectP6/Wall/perl6-object-examine/lib/
  /home/doom/End/Cave/IntrospectP6/Wall/perl6-augment-util/lib
  /home/doom/End/Cave/IntrospectP6/Wall/perl6-symbol-scan/lib
  /home/doom/End/Cave/IntrospectP6/Wall/perl6-method-menu/lib
  /home/doom/End/Cave/Perl6/lib
  /home/doom/End/Cave/Eye/lib/perl6
  /home/doom/lib/perl6
  /home/doom/End/Sys/Perl6/perl6-Perl6-Tidy-master/lib
  /home/doom/End/Sys/Perl6/perl6-Perl6-Parser-master/lib
  /home/doom/End/Sys/Perl6/p6-JSON-Pretty-master/lib


Cutting those locations down to just three (most of them were
empty, anyway):

  echo $PERL6LIB | tr ",", "\n"
  /home/doom/End/Cave/Perl6/lib
  /home/doom/End/Cave/Eye/lib/perl6
  /home/doom/lib/perl6

Gets you a roughly 6x speed-up:

  time perl6 -e'say "Saaaay..."'
  Saaaay...

  real  0m1.685s

Reply via email to