Bug 1795707

Summary: Notification Drawer slows down page load, rerenders unnecessarily [openshift-4.4]
Product: OpenShift Container Platform Reporter: bpeterse
Component: Management ConsoleAssignee: Joe Caiani <jcaiani>
Status: CLOSED ERRATA QA Contact: shahan <hasha>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.4CC: aos-bugs, hasha, jokerman, spadgett
Target Milestone: ---   
Target Release: 4.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-04 11:27:29 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description bpeterse 2020-01-28 16:51:03 UTC
Description of problem:

To ensure performance,the notification drawer should not render when closed. Currently it will render, but "display:none".  This does a lot of work creating DOM nodes and listeners that may have an impact on the page. Simpler list pages may not be affected, but complex pages such as monitoring that have charts and heavy visuals may experience greater impact.

Comment 1 Joe Caiani 2020-01-28 17:48:18 UTC
@bpeterse the polling still needs to occur so as to inform the notification badge with current alert states, but you are right, there is no need to display the contents of the drawer. Adding code to conditionally render the drawer contents.

Comment 2 Samuel Padgett 2020-02-05 15:51:18 UTC
We've profiled this, and the two main performance problems we've seen are:

1. Using `AsyncComponent`, which slows page load since the component will always be loaded. This causes the page to flicker full black with a loading icon on console load.
2. Unnecessary component renders due to hook dependencies changing every time.

We can evaluate the performance impact using CSS to hide the drawer has, but I think we should fix the clear problems we've seen during profiling first.

Comment 6 shahan 2020-03-03 02:39:33 UTC
Checked the notification works well with the performance improvement.
4.4.0-0.nightly-2020-03-02-042029

Comment 8 errata-xmlrpc 2020-05-04 11:27:29 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/RHBA-2020:0581