Repository navigation
perf(erd): opening a 200-table diagram no longer builds every card in one frame (#1546) - #1715
Merged
Merged
Conversation
…panel), picking fades the others so it cannot show that
…so it never hit; compare its slot colours (#1546)
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1546 once #1714 is merged (the bench fix is a commit of that branch, so this PR carries it too).
erd_open_200showed build p90 105–112 ms (profile build, real hardware; 139.6 ms on the CI runner against a 50 ms limit): all 200 cards mounted in one frame, and every later rebuild of the diagram rebuilt all 200 cards again._cardskeeps each card with what it was built from (columns, position, width, header colour, collapsed/marked/dragging, junction, menu inputs, palette, callbacks). When none of it changed the same widget is returned and Flutter skips the subtree. A pick, a drag or a toolbar change no longer rebuilds 200 cards.Measured with the bench (profile,
flutter run, same machine): erd_open_200 build p90 108–112 → 34–41 ms (max 45–62), erd_hover and erd_drag unchanged (0.2 ms p90).Tests: a 100-table diagram does not carry every card in its first frame and has all of them after more frames; picking a table rebuilds fewer than 20 of 20 cards.