Skip Menu |

This queue is for tickets about the Getopt-Alt CPAN distribution.

Report information
The Basics
Id: 98242
Status: rejected
Priority: 0/
Queue: Getopt-Alt

People
Owner: Nobody in particular
Requestors: sharyanto [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: Suggestion: reduce startup overhead
Just a suggestion: you might want to consider switching from Moose to Moo (or even Mo?) to reduce startup overhead. Also, delay loading some modules, for example, no need to 'use Pod::Usage' first at the start of module, unless you want to display help. Just loading your module takes almost a quarter of a second. This is annoying at best and unacceptable in some cases for command-line program that must start and return quickly. $ time perl -MGetopt::Alt -E1 real 0m0.221s user 0m0.204s sys 0m0.012s Compare with Getopt::Long (starts 10-15x faster): $ time perl -MGetopt::Long -E1 real 0m0.014s user 0m0.004s sys 0m0.008s Regards, Steven
Performance is a valid point but unfortunately Moo doesn't have the same tools to dynamically construct modules. I did have a go but I rely too heavily on the MOP. Ivan On Fri Aug 22 13:29:20 2014, SHARYANTO wrote: Show quoted text
> Just a suggestion: you might want to consider switching from Moose to > Moo (or even Mo?) to reduce startup overhead. Also, delay loading some > modules, for example, no need to 'use Pod::Usage' first at the start > of module, unless you want to display help. > > Just loading your module takes almost a quarter of a second. This is > annoying at best and unacceptable in some cases for command-line > program that must start and return quickly. > > $ time perl -MGetopt::Alt -E1 > real 0m0.221s > user 0m0.204s > sys 0m0.012s > > Compare with Getopt::Long (starts 10-15x faster): > > $ time perl -MGetopt::Long -E1 > > real 0m0.014s > user 0m0.004s > sys 0m0.008s > > Regards, > Steven