in reply to Re: slow startup for some common modules? (autodie, Pod::Usage, Getopt::Long))
in thread slow startup for some common modules? (autodie, Pod::Usage, Getopt::Long))

Thanks for taking a look. For a standalone "application", 100msec for sure doesn't matter. However, if (1) I'm calling several perl scripts inside bashrc, or (2) a script is invoked after every command (PROMPT_COMMAND in bash) or (3) a script runs in an editor on every keystroke (see the vim-like editor Kakoune), those 100msec add up. 10 scripts taking 100msec each result in a 1sec delay before being able to type anything, which is of course unacceptable.
  • Comment on Re^2: slow startup for some common modules? (autodie, Pod::Usage, Getopt::Long))

Replies are listed 'Best First'.
Re^3: slow startup for some common modules? (autodie, Pod::Usage, Getopt::Long))
by sciurius (Beadle) on Feb 11, 2025 at 08:19 UTC

    I really wonder why such a program would need the full option processing powers of Getopt::Long, if at all.

    Options are most useful for programs that are used for several related but different actions. In particular cases 2 and 3 above I would stick to a dedicated program.

    Also, perl -s is even faster than Getopt::Std.