You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been using App::Cmd as a framework for defining individual batch
jobs. This has worked out fairly well so far, but as the number of
jobs/commands has increased into the 70+ range, the overhead of doing a
C on each command has become noticeable.
Because these jobs do a wide range of tasks, each call to the main app
ends up loading 600-ish pm files.
Would you consider adding a lazy_load option which, when true, would
only require the given command during the _prepare_command phase?
Using this option would necessarily enforce a 1-command-per-pm limit.
An added benefit to this in a shared environment, is that other users'
broken commands only affect you if you attempt a command listing or help.
I've attached a proof of concept patch. If you are interested in adding
this option I could create a more formal patch with tests.
Thanks,
danboo
The text was updated successfully, but these errors were encountered:
See also this blog post referencing the issue. Lazy loading of commands is also related to pull request #20 - it would be great to solve both issues (how to specify commands and how these commands are loaded) together. The slowness of App::Cmd has already complained before and Mark Lawrence wrote App::Dispatcher as fork of App::Cmd in 2011. This is confusing if one is looking for a tool to create a command line app. I'd prefer to get App::Cmd as best as possible instead of more modules on CPAN with unknown features and downsides.
https://rt.cpan.org/Ticket/Display.html?id=54947
I've been using App::Cmd as a framework for defining individual batch
jobs. This has worked out fairly well so far, but as the number of
jobs/commands has increased into the 70+ range, the overhead of doing a
C on each command has become noticeable.
Because these jobs do a wide range of tasks, each call to the main app
ends up loading 600-ish pm files.
Would you consider adding a
lazy_load
option which, when true, wouldonly
require
the given command during the_prepare_command
phase?Using this option would necessarily enforce a 1-command-per-pm limit.
An added benefit to this in a shared environment, is that other users'
broken commands only affect you if you attempt a command listing or help.
I've attached a proof of concept patch. If you are interested in adding
this option I could create a more formal patch with tests.
Thanks,
The text was updated successfully, but these errors were encountered: