Description of problem:
It takes about 56 seconds for this page to load when there are 100 images in the system. There are alot of calls to iwhd, so this may be the underlying issue. Perhaps we can paginate the table.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Build 100 images for mock.
You can use this jmeter test to help with creating multiple images: https://github.com/aeolusproject/aeolus-performance-testing/tree/master/jmeter/build-and-push
The source of the slowness is in to two places in app/views/images/_list.html.haml. Both are indeed calls to iwhd.
The first is these two lines to fetch the name and version of the OS:
= image.os.name.empty? ? "N/A" : image.os.name
= image.os.version.empty? ? "N/A" : image.os.version
It is the call on the os method that is expensive. Removing these two lines eliminates 24 seconds.
The second is a call to retrieve the last push or last build timestamp.
= Time.at(image.latest_pushed_or_unpushed_build.timestamp.to_f) rescue ''
Removing this lines saves 16 seconds.
added images pagination in commit cc30f44ae11fd8c3096564477e777c1cea0f295b
I'm flagging this for Z since it is a legit high-severity issue and there is already a fix. Wes, Dave, are you comfortable with risk on the fix?
Note: the patchfix related to this BZ has been pushed into 1.0.1 (commit 4178f9f320dd99c60c5f4e0501f1d58883d4fc9f)
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.