Bug #17740

Printing longer lists with table formatter is extremely slow

Added by Tomáš Strachota 6 months ago. Updated 3 months ago.

Status:Closed
Priority:Normal
Assigned To:Tomáš Strachota
Category:Hammer core
Target version:Foreman - Team Marek backlog
Difficulty: Bugzilla link:1393611
Found in release: Pull request:https://github.com/theforeman/hammer-cli/pull/229
Story points-
Velocity based estimate-
Releasehammer-cli-0.10.0Release relationshipAuto

Description

The table formatter prints data via table_print gem into a string, then parses the output, reorders columns and finally prints the new string to stdout. This approach is extremely slow for long lists.

Attached logs show that printing a list of about 3000 records (hammer errata list) took 15m 13s, where the time needed to fetch the data from server was only 25 seconds.

The same command executed with base formatter took only 27 seconds. Other formatters perform similarly.

erratum_list_out_table.txt.tar.gz (1.8 MB) Tomáš Strachota, 12/19/2016 10:13 AM

erratum_list_out_base.txt.tar.gz (1.81 MB) Tomáš Strachota, 12/19/2016 10:21 AM


Related issues

Related to Hammer CLI - Feature #17819: Output adapters should support printing lists page by page New 12/21/2016

Associated revisions

Revision 0d3e8135
Added by Tomas Strachota 6 months ago

Fixes #17740 - replacement for table_print

Replaces table print with a custom solution due to performance reasons.

History

#1 Updated by Tomáš Strachota 6 months ago

  • Status changed from New to Assigned
  • Bugzilla link set to 1393611

#2 Updated by The Foreman Bot 6 months ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/hammer-cli/pull/229 added

#3 Updated by Tomáš Strachota 6 months ago

  • Related to Feature #17819: Output adapters should support printing lists page by page added

#4 Updated by Anonymous 6 months ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#5 Updated by Tomáš Strachota 3 months ago

  • Release set to hammer-cli-0.10.0

Also available in: Atom PDF