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

Optimize TableColumn component by caching relationship checks #278

Merged
merged 1 commit into from
Dec 16, 2024

Conversation

hoshinotsuyoshi
Copy link
Member

@hoshinotsuyoshi hoshinotsuyoshi commented Dec 16, 2024

Summary

Optimize TableColumn component by caching relationship checks.
Introduced useMemo to cache isSource and targetCardinality computations.

Experiment

Triggered handleMouseLeaveNode manually on the accounts table node to measure performance impact.

Demo
2024-12-16.18.45.55.mov

1. ERDContentInner

before: ~660 ms
after: ~170 ms

before 90fae17 after f843a99
main1-sk hoshino1-sk

2. TableColumn: account_aliases table > id column

before: ~0.6 ms
after: ~0.1 ms

before 90fae17 after f843a99
main2-sk hoshino2-sk

Testing

N/A

Other Information

N/A

- Introduced useMemo to cache `isSource` and `targetCardinality` computations.
@hoshinotsuyoshi hoshinotsuyoshi force-pushed the optimize-table-column-component branch from b1c1aa6 to f843a99 Compare December 16, 2024 10:32
@hoshinotsuyoshi hoshinotsuyoshi marked this pull request as ready for review December 16, 2024 10:39
@hoshinotsuyoshi hoshinotsuyoshi requested a review from a team as a code owner December 16, 2024 10:39
@hoshinotsuyoshi hoshinotsuyoshi requested review from FunamaYukina, junkisai, MH4GF and sasamuku and removed request for a team December 16, 2024 10:39
Copy link
Member

@MH4GF MH4GF left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍🏻 🚀

@MH4GF MH4GF added this pull request to the merge queue Dec 16, 2024
Merged via the queue into main with commit 4656362 Dec 16, 2024
12 checks passed
@MH4GF MH4GF deleted the optimize-table-column-component branch December 16, 2024 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants