Bug 1727443 - Building the services tree takes too long when having 1000+ services
Summary: Building the services tree takes too long when having 1000+ services
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.10.5
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: GA
: 5.10.8
Assignee: Dávid Halász
QA Contact: Niyaz Akhtar Ansari
Red Hat CloudForms Documentation
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-07-06 11:21 UTC by Dávid Halász
Modified: 2019-08-19 08:59 UTC (History)
8 users (show)

Fixed In Version: 5.10.8.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-08-13 08:35:35 UTC
Category: Bug
Cloudforms Team: CFME Core
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2019:2466 None None None 2019-08-13 08:35:46 UTC

Description Dávid Halász 2019-07-06 11:21:48 UTC
Description of problem:
The lazily-loaded services tree has an N+1 query when building.

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


How reproducible:


Steps to Reproduce:
1. Have at least 1k services
2. Go to Services -> My services

Actual results:
The wait time for processing the request is long

Expected results:
Processing the request should be faster

Additional info:
There's a fix in upstream: https://github.com/ManageIQ/manageiq-ui-classic/pull/5686

Comment 5 Satoe Imaishi 2019-07-10 15:55:16 UTC
David, for hammer branch, do we also need the followings?

https://github.com/ManageIQ/manageiq-ui-classic/pull/5729
https://github.com/ManageIQ/manageiq-ui-classic/pull/5737

Those PRs go with bug #1703556. We had a separate PR for hammer branch (https://github.com/ManageIQ/manageiq-ui-classic/pull/5530) for that BZ, but the 2 PRs are hammer/yes.

Comment 6 Dávid Halász 2019-07-10 20:13:26 UTC
Yes

Comment 7 CFME Bot 2019-07-22 20:18:05 UTC
New commits detected on ManageIQ/manageiq-ui-classic/hammer:

https://github.com/ManageIQ/manageiq-ui-classic/commit/99c27e15cb74c66888bf513f34e4bd7c55c9a4e3
commit 99c27e15cb74c66888bf513f34e4bd7c55c9a4e3
Author:     Martin Hradil <mhradil@redhat.com>
AuthorDate: Fri Jun 21 07:25:56 2019 -0400
Commit:     Martin Hradil <mhradil@redhat.com>
CommitDate: Fri Jun 21 07:25:56 2019 -0400

    Merge pull request #5729 from skateman/explorer-tree-init-object

    Do not let angular parse the treeview data as it can be 🐢 HUGE 🐌

    (cherry picked from commit 6d088fe4db708aad3506d0b097a64f2b3c041ef1)

    https://bugzilla.redhat.com/show_bug.cgi?id=1727443

 app/assets/javascripts/controllers/tree_view_controller.js | 5 +-
 app/assets/javascripts/miq_global.js | 1 +
 app/views/layouts/listnav/_explorer.html.haml | 4 +-
 app/views/layouts/listnav/_generic_object_definition_show_list_with_treeview.html.haml | 4 +-
 4 files changed, 10 insertions(+), 4 deletions(-)


https://github.com/ManageIQ/manageiq-ui-classic/commit/1d0e088f004ff498808692ac47cb069b0a438853
commit 1d0e088f004ff498808692ac47cb069b0a438853
Author:     Milan Zázrivec <mzazrivec@redhat.com>
AuthorDate: Mon Jun 24 02:16:43 2019 -0400
Commit:     Milan Zázrivec <mzazrivec@redhat.com>
CommitDate: Mon Jun 24 02:16:43 2019 -0400

    Merge pull request #5737 from skateman/tree-data-delete

    Fix temporary tree data deletion in angular explorer trees

    (cherry picked from commit f9a1581ec70962ec1cc8383a66a472d6abb41b61)

    https://bugzilla.redhat.com/show_bug.cgi?id=1727443

 app/assets/javascripts/controllers/tree_view_controller.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comment 8 CFME Bot 2019-07-23 11:18:02 UTC
New commit detected on ManageIQ/manageiq-ui-classic/hammer:

https://github.com/ManageIQ/manageiq-ui-classic/commit/32ff2f351a1c42512be233c1c3a51fba57c951a6
commit 32ff2f351a1c42512be233c1c3a51fba57c951a6
Author:     Dávid Halász <dhalasz@redhat.com>
AuthorDate: Mon Jun 24 06:48:22 2019 -0400
Commit:     Dávid Halász <dhalasz@redhat.com>
CommitDate: Mon Jun 24 06:48:22 2019 -0400

    Improve the performance the lazy-loading of services tree by caching

    (cherry picked from commit eb8e1f40128c6463f9e2580585920203a03bc315)

    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1727443

 app/presenters/tree_builder_services.rb | 41 +-
 1 file changed, 32 insertions(+), 9 deletions(-)

Comment 13 errata-xmlrpc 2019-08-13 08:35:35 UTC
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.

https://access.redhat.com/errata/RHSA-2019:2466

Comment 14 Jaroslav Henner 2019-08-19 08:59:38 UTC
(In reply to Niyaz Akhtar Ansari from comment #11)
> Thanks David
> 
> Now Processing the request is faster
> Verified in Version 5.10.8.0.20190729222758_e725e22

Hi Niyaz. I already started writing a test for Bug 1686433 - proxy timeout loading list of services post update :
https://github.com/ManageIQ/integration_tests/pull/8698
which I think is related


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