Description of problem: Hammer is slow, in partiluar its start phase. This is however not caused by hammer itself, but by hammer_cli_katello. Adding debug prints to part of code that loads modules, it shows:
X pre loading module hammer_cli_import: Fri Jun 06 06:49:01 -0400 2014
X post loading module hammer_cli_import: Fri Jun 06 06:49:01 -0400 2014
X pre loading module hammer_cli_katello: Fri Jun 06 06:49:01 -0400 2014
X post loading module hammer_cli_katello: Fri Jun 06 06:49:06 -0400 2014
X pre loading module hammer_cli_foreman: Fri Jun 06 06:49:06 -0400 2014
X post loading module hammer_cli_foreman: Fri Jun 06 06:49:06 -0400 2014
How reproducible: always deterministic
Steps to Reproduce: Just run hammer
Actual results: It takes some time before it prints help message (4-5 seconds)
Expected results: For user this is instantaneous.
Additional info: It looks like it does some requests on server in this phase before initialize for particular subcommand is called. (Sometimes even emits 404).
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.
With six hammer modules enabled (included hammer-cli-katello), I'm getting roughly 2.5 seconds of time between pressing enter and the command finishing. Is this amount of time still unacceptable? It is an improvement over 4-5 seconds.
$ time hammer --version
* hammer_cli_console (0.0.1)
* hammer_cli_foreman (0.1.4.13)
* hammer_cli_foreman_bootdisk (0.1.3)
* hammer_cli_foreman_tasks (0.0.6)
* hammer_cli_gutterball (1.0.0)
* hammer_cli_katello (0.0.14)
Marking this as a dupe of a bug which has a fix.
*** This bug has been marked as a duplicate of bug 1122810 ***