Bug 2053685 - Topology performance: Immutable .toJSON consumes a lot of CPU time when rendering a large topology graph (~100 nodes)
Summary: Topology performance: Immutable .toJSON consumes a lot of CPU time when rende...
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Dev Console
Version: 4.6
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 4.11.0
Assignee: Christoph Jerolimov
QA Contact: spathak@redhat.com
Depends On:
Blocks: 2054757
TreeView+ depends on / blocked
Reported: 2022-02-11 18:47 UTC by Christoph Jerolimov
Modified: 2022-08-10 10:50 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2022-08-10 10:49:30 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Github openshift console pull 11001 0 None open Bug 2053685: (Topology) Performance improvement by reducing rerenderings and deep-copy toJSON() calls 2022-02-11 18:49:01 UTC
Red Hat Product Errata RHSA-2022:5069 0 None None None 2022-08-10 10:50:06 UTC

Description Christoph Jerolimov 2022-02-11 18:47:50 UTC
Description of problem:
When analyzing some topology performance issues it shows that the Immutable method to convert immutable data structures to 'plain' JavaScript objects via toJSON() consumes a lot of time. The result is a slow starting topology and rerender process when showing more then 100 nodes.

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

How reproducible:
Always on a cluster with many many Deployments (tested with round about 100 nodes)

Steps to Reproduce:
1. Create many nodes, see https://github.com/jerolimov/openshift/tree/master/loadtest
2. Open the dev perspective, switch to the add page
3. Enable profiling tools in your browser
4. Open the topology and stop profiling after page is loaded

Actual results:
With around 100 nodes (Deployments for example) the topology is really slow and laggy. A lot of CPU time is consumed in ImmutableJS toJSON

Expected results:
A faster topology. :)

Additional info:

Comment 3 Christoph Jerolimov 2022-03-17 11:42:23 UTC
Tested topology with 100 Deployments on 4.11.0-0.nightly-2022-03-16-103946 and it is quite fast.

It's less responsible then 4.10 because it makes to many API calls to /api/kubernetes/apis/authorization.k8s.io/v1/selfsubjectaccessreviews but we will address this in another issue.

Comment 5 errata-xmlrpc 2022-08-10 10:49:30 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 (Important: OpenShift Container Platform 4.11.0 bug fix and security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


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