Bug 1584355

Summary: Slow performance with displaying catalog order dialog
Product: Red Hat CloudForms Management Engine Reporter: Ryan Spagnola <rspagnol>
Component: UI - OPSAssignee: Tina Fitzgerald <tfitzger>
Status: CLOSED CURRENTRELEASE QA Contact: Shveta <sshveta>
Severity: high Docs Contact:
Priority: high    
Version: 5.9.0CC: cpelland, duhlmann, hkataria, jcrumple, jprause, lavenel, mpovolny, myoder, obarenbo, rovalent, rspagnol, simaishi, sshveta, tfitzger
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.10.0   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: 5.10.0.4 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1591427 (view as bug list) Environment:
Last Closed: 2019-02-11 14:09:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: Bug
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: CFME Core Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1591427    
Attachments:
Description Flags
Dialog cache screen shot
none
dialog export
none
datastore export none

Description Ryan Spagnola 2018-05-30 18:01:16 UTC
Description of problem:
Upgrading from version 5.8 to 5.9 customer is facing a performance hit when displaying the catalog order dialog. With 5.8 the page would load within 2-3 seconds, with 5.9 it is now taking 15-25 seconds to load.

Version-Release number of selected component (if applicable):
5.9.2.4

How reproducible:
Always

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:
loading times should be similar to 5.8

Additional info:

Comment 3 Tina Fitzgerald 2018-05-31 17:26:32 UTC
Hi Ryan,

Can you ask the customer to provide the 5.8 and 5.9 dialogs and the Automate domain export?

Thanks,
Tina

Comment 8 Tina Fitzgerald 2018-06-04 15:16:58 UTC
Hi Ryan,

Thanks for the update.
Can you clarify that this issue is being reported against the OPSUI and not the SUI?

I see the related ticket referenced is for the SUI.

Thanks,
Tina

Comment 9 Ron 2018-06-04 15:18:40 UTC
Confirmed, this is occurring when we are using the OPSUI.

Comment 12 Tina Fitzgerald 2018-06-05 18:51:48 UTC
Shveta setup appliance:
https://10.8.198.204
imported the dialog and automate method
created catalog item

Comment 18 drew uhlmann 2018-06-11 12:23:42 UTC
I can for her, I think. https://github.com/ManageIQ/manageiq/pull/17436 hasn't been backported and it will fix at least a good part of this issue.

Comment 19 drew uhlmann 2018-06-11 14:03:27 UTC
17436 just got merged so this needs to be retested.

Comment 20 Tina Fitzgerald 2018-06-11 20:45:28 UTC
Hi Ryan,

During the debugging session with the customer last week, we determined that some of the performance issues the customer is experiencing are due to the large amount of data being processed by multiple dynamic dialog entries. There is one case where 4 dialog elements execute the same Automate method.

We discussed 3 ways to improve performance:

1. A fix for running Automate multiples times was back ported this week. Customer can request a hot fix.
https://github.com/ManageIQ/manageiq/pull/17436 - master PR
https://github.com/ManageIQ/manageiq/commit/f984d7be552833dc5f03f5c5fad4982ca0a49626 - G release commit

2. Expression methods can be used in place of ruby methods for dynamic dialogs.
More information here: http://talk.manageiq.org/t/automate-expression-methods/3071

3. For the method that is executed 4 times:
Dialog Data Caching: Execute the method once and store the data to present in the 3 other dialog elements.
Directions below:
     
Dialog Data Caching:
Attachments contain two files (Dialog and Automate-domain exports) that show a caching  example.  

The example uses two fields.  The first field creates some json data and stores it into the field value.  The second field does a `JSON.load` on the data from the first field and uses one of the json keys to display in the second field.  The first field holding the json data would normally be hidden but it is visible to make it easier to see when running the dialog.

To test, import the two attached files into an appliance, make sure the new domain "dialog_caching" is enabled, then create a generic service that uses the dialog.

Let me know if you have any questions.

Thanks,
Tina

Comment 21 Tina Fitzgerald 2018-06-11 20:47:38 UTC
Created attachment 1450185 [details]
Dialog cache screen shot

Comment 22 Tina Fitzgerald 2018-06-11 20:48:09 UTC
Created attachment 1450186 [details]
dialog export

Comment 23 Tina Fitzgerald 2018-06-11 20:49:03 UTC
Created attachment 1450187 [details]
datastore export

Comment 28 drew uhlmann 2018-06-26 17:57:26 UTC
Just kidding!! Ignore the last comment, please.

Comment 30 Shveta 2018-07-18 19:04:31 UTC
Dialog methods are run only once when the dilaog is loaded.
Verified in 5.10.0.3.20180705151325_ce4d2b5