Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf(editor): SchemaView performance improvement by β‰ˆ90% πŸš€ #12180

Merged
merged 5 commits into from
Dec 12, 2024

Conversation

r00gm
Copy link
Contributor

@r00gm r00gm commented Dec 12, 2024

Summary

Public release of the performance improvements to the SchemaView in the Node Viewer

Remove the environment variable gating the feature from the public.

For details about the implementations please refer to: #11694

The difference in performance is calculated between the previous and current implementation with a volume of around 23k key - values

Memory usage

  • Memory usage before optimization:
    • Minimum: 67.8 MB
    • Maximum: 1527 MB
    • Difference (range): 1527 βˆ’ 67.8 = 1459.2 MB

  • Memory usage after optimization:
    • Minimum: 68.2 MB
    • Maximum: 206 MB
    • Difference (range): 206 βˆ’ 68.2 = 137.8 MB


  • Reduction in memory range:
    • Absolute change: 1459.2 βˆ’ 137.8 = 1321.4 MB
  • Percentage improvement:
    • Formula: (absoluteΒ change / initialΒ usage) * 100
    • (1321.4 / 1459.2) Γ— 100 β‰ˆ 90.57%

Rendered DOM nodes

  • Number of DOM nodes before optimization:
    • Minimum: 3,088
    • Maximum: 966,894
    • Difference (range): 966,894 βˆ’ 3,088 = 963,806 nodes
  • Number of nodes after optimization:
    • Minimum: 3,188
    • Maximum: 9,415
    • Difference (range): 9,415 βˆ’ 3,188 = 6,227 nodes
  • Reduction in the range of nodes:
    • Absolute change: 963,806 βˆ’ 6,227 = 957,579 nodes
  • Percentage improvement:
    • Formula: (absoluteΒ change / initialΒ usage) * 100
    • (957,579 / 963,806) Γ— 100 β‰ˆ 99.35%

image

Related Linear tickets, Github issues, and Community forum posts

PAY-2373
PAY-2225
PAY-1900

#11878

Review / Merge checklist

  • PR title and summary are descriptive. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.
  • PR Labeled with release/backport (if the PR is an urgent fix that needs to be backported)

@n8n-assistant n8n-assistant bot added core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team ui Enhancement in /editor-ui or /design-system labels Dec 12, 2024
Copy link

codecov bot commented Dec 12, 2024

Codecov Report

All modified and coverable lines are covered by tests βœ…

πŸ“’ Thoughts on this report? Let us know!

@r00gm r00gm changed the title Pay 2373 virtual schema clean up perf(editor): SchemaView performance improvement by β‰ˆ90% πŸš€ Dec 12, 2024
@r00gm r00gm marked this pull request as ready for review December 12, 2024 11:29
mutdmour
mutdmour previously approved these changes Dec 12, 2024
Copy link
Contributor

⚠️ Some Cypress E2E specs are failing, please fix them before merging

Copy link

cypress bot commented Dec 12, 2024

n8nΒ  Β  Run #8317

Run Properties:Β  status check passedΒ PassedΒ #8317 Β β€’Β  git commit 0f2a38abd4: 🌳 πŸ–₯️ browsers:node18.12.0-chrome107 πŸ€– r00gm πŸ—ƒοΈ e2e/*
Project n8n
Branch Review pay-2373-virtual-schema-clean-up
Run status status check passedΒ PassedΒ #8317
Run duration 04m 41s
Commit git commit 0f2a38abd4: 🌳 πŸ–₯️ browsers:node18.12.0-chrome107 πŸ€– r00gm πŸ—ƒοΈ e2e/*
Committer r00gm
View all properties for this run β†—οΈŽ

Test results
Tests that failedΒ  Failures 0
Tests that were flakyΒ  Flaky 2
Tests that did not run due to a developer annotating a test with .skipΒ  Pending 0
Tests that did not run due to a failure in a mocha hookΒ  Skipped 0
Tests that passedΒ  Passing 480
View all changes introduced in this branch β†—οΈŽ

Copy link
Contributor

βœ… All Cypress E2E specs passed

@r00gm r00gm merged commit 6a58309 into master Dec 12, 2024
58 checks passed
@r00gm r00gm deleted the pay-2373-virtual-schema-clean-up branch December 12, 2024 13:04
@janober
Copy link
Member

janober commented Dec 19, 2024

Got released with [email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team Released ui Enhancement in /editor-ui or /design-system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants