Bug 1105535 - hammer_cli_katello slows hammer start-up significantly
Summary: hammer_cli_katello slows hammer start-up significantly
Keywords:
Status: CLOSED DUPLICATE of bug 1122810
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Hammer
Version: Nightly
Hardware: Unspecified
OS: Unspecified
unspecified
low vote
Target Milestone: Unspecified
Assignee: Adam Price
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-06-06 10:58 UTC by Matej Kollar
Modified: 2016-10-07 13:51 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-10-07 13:51:27 UTC


Attachments (Terms of Use)

Description Matej Kollar 2014-06-06 10:58:59 UTC
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).

Comment 1 RHEL Product and Program Management 2014-06-06 11:13:57 UTC
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.

Comment 4 Adam Price 2015-06-25 18:08:54 UTC
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 (0.2.0)
 * 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)

real    0m2.443s
user    0m2.107s
sys     0m0.299s

Comment 6 Bryan Kearney 2016-10-07 13:51:27 UTC
Marking this as a dupe of a bug which has a fix.

*** This bug has been marked as a duplicate of bug 1122810 ***


Note You need to log in before you can comment on or make changes to this bug.