Skip to content

fix(perf): add NFS/UI benchmark and related performance patches - #5898

Closed
christoph-jerolimov wants to merge 7 commits into
mainfrom
perf/add-scale-benchmark
Closed

christoph-jerolimov wants to merge 7 commits into
mainfrom
perf/add-scale-benchmark

Conversation

@christoph-jerolimov

Copy link
Copy Markdown
Member

Summary

  • Adds an opt-in frontend system scale benchmark (yarn test:bench / BENCH=1) that measures app tree creation, route resolution, and route-change cost as plugins/pages/entity contents grow.
  • Yarn-patches @backstage/frontend-app-api to cache route matches per source location (upstream a499f55).
  • Yarn-patches @backstage/core-components to share sidebar item style hooks, memoize sidebar item content, and avoid per-item MUI Box style sheets (upstream f7d2786, caee60b, 3343cfa).
  • Yarn-patches @backstage/plugin-catalog to memoize filtered entity content routes (upstream e7e1085).

Test plan

  • yarn install succeeds and yarn why shows patch locators for frontend-app-api, core-components, and plugin-catalog
  • yarn test:bench (or BENCH=1 CI=1 yarn workspace app test:bench) runs and prints BENCH lines
  • Spot-check catalog entity page sidebar/tabs still render and switch correctly
  • Confirm Backstage bump / patch CI job is green

Made with Cursor

christoph-jerolimov and others added 6 commits November 24, 2026 11:58
Adds an opt-in benchmark that measures app tree creation, route
resolution and route change time as the number of plugins, page
extensions and entity content extensions grows. It is skipped unless
the BENCH environment variable is set.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: Christoph Jerolimov <jerolimov+git@redhat.com>
Each route resolution matched the source location against the entire
route tree. The cost grows with the number of routes in the app and is
paid by every caller on every location change. The matches for the most
recently used source locations are now cached.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: Christoph Jerolimov <jerolimov+git@redhat.com>
Each sidebar item created its own style hook, which attached a separate
style sheet for every item. The hooks are now shared between all
components with an equal sidebar config.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: Christoph Jerolimov <jerolimov+git@redhat.com>
Sidebar items re-render on every location change to update their active
state. The content of the item is now memoized so that only the link
itself is re-rendered.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: Christoph Jerolimov <jerolimov+git@redhat.com>
The filtered routes were a new array on every render, which made the
memoization of the entity tabs and the selected sub route ineffective.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: Christoph Jerolimov <jerolimov+git@redhat.com>
Each Box in a sidebar item attached its own dynamic style sheet, three
per item. None of them carried any styles, so they are replaced with
plain elements.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: Christoph Jerolimov <jerolimov+git@redhat.com>
@openshift-ci

openshift-ci Bot commented Nov 24, 2026

Copy link
Copy Markdown

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification

This PR uses the pipeline controller for second-stage tests. Selection and triggering follow the repository configuration.

Use /test ? to list jobs and /pipeline help for commands.

@christoph-jerolimov christoph-jerolimov changed the title Add frontend system scale benchmark and related performance patches fix(perf): add NFS/UI benchmark and related performance patches Nov 24, 2026
@christoph-jerolimov

Copy link
Copy Markdown
Member Author

/test all

@openshift-ci

openshift-ci Bot commented Nov 24, 2026

Copy link
Copy Markdown

@christoph-jerolimov: No jobs can be run with /test all.
The following commands are available to trigger required jobs:

/test e2e-ocp-helm

The following commands are available to trigger optional jobs:

/test cleanup-mapt-destroy-orphaned-aks-clusters
/test cleanup-mapt-destroy-orphaned-eks-clusters
/test e2e-aks-helm-nightly
/test e2e-aks-operator-nightly
/test e2e-eks-helm-nightly
/test e2e-eks-operator-nightly
/test e2e-gke-helm-nightly
/test e2e-gke-operator-nightly
/test e2e-ocp-disconnected-helm-nightly
/test e2e-ocp-disconnected-operator-nightly
/test e2e-ocp-helm-localization-nightly
/test e2e-ocp-helm-nightly
/test e2e-ocp-helm-upgrade-nightly
/test e2e-ocp-operator-nightly
/test e2e-ocp-v4-19-helm-nightly
/test e2e-ocp-v4-20-helm-nightly
/test e2e-ocp-v4-21-helm-nightly
/test e2e-ocp-v4-22-fips-helm-nightly
/test e2e-ocp-v5-0-helm-nightly
/test e2e-osd-gcp-helm-nightly
/test e2e-osd-gcp-operator-nightly
Details

In response to this:

/test all

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Signed-off-by: Christoph Jerolimov <jerolimov+git@redhat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

Copy link
Copy Markdown
Contributor

The container image build workflow finished with status: cancelled.

@sonarqubecloud

Copy link
Copy Markdown

@codecov

codecov Bot commented Nov 24, 2026

Copy link
Copy Markdown

⚠️ JUnit XML file not found

The CLI was unable to find any JUnit XML files to upload.
For more help, visit our troubleshooting guide.

@github-actions

Copy link
Copy Markdown
Contributor

Image was built and published successfully. It is available at:

@openshift-ci

openshift-ci Bot commented Nov 27, 2026

Copy link
Copy Markdown

PR needs rebase.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@christoph-jerolimov

Copy link
Copy Markdown
Member Author

Close this in favor of #5932 (for main) and #5933 for release-2.1.

@christoph-jerolimov
christoph-jerolimov deleted the perf/add-scale-benchmark branch November 30, 2026 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant