Repository navigation
Conversation
Layer: 1-cull-badge-overlay
Layer: 1-cull-badge-overlay
Layer: 1-cull-badge-overlay
Layer: 1-cull-badge-overlay
This branch has not been deployed
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.
Summary
Panning and zooming the Graph View drops to about 13 fps at 5,000 nodes, because the badge overlay walks every node on every frame, even off-screen nodes and at zoom levels where no badge shows.
User-facing: Panning and zooming large graphs is smoother. Badges look the same.
drawNodeBadgesinuseRenderBadges.tsholds the per-frame loop so it can be tested with headless Cytoscape.drawBoxWithAdornment.tscaches text widths and truncated text per font, with a 50,000-entry limit per font.BadgeRenderer'szoomLeveldrops"small"and the two checks for it inuseNodeBadges.tsare gone.Evidence
Before: At 5,000 nodes, zoomed in close enough to show badges, a pan ran at 13.0 fps and a zoom at 23.7 fps. The overlay took about half the main thread.
After: The same pan runs at 26.4 fps and the zoom at 41.1 fps. At 2,000 nodes, a close pan goes from 41.0 to 59.4 fps. Agent-tested: medians of 3 fresh loads of a production build in headless Chrome against a seeded Gremlin Server.
Merge Danger
Door: two-way
Impact: rendering
A badge whose node center sits more than 60 units outside the view is not drawn. Today's badges reach about 45 units from their node's center, so none is cut off at the edge.
Related
🤖 Written by an AI agent on my behalf.