[P1 performance] Renderer policy is frozen to the first graph opened in PR #124 #129
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
needs-review
quasar
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nsaspy/quasar-ui#129
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Finding
In
perf/large-graph-responsiveness,GraphCanvascomputes Cytoscape renderer options frominitialGraphSize.currentonly when the component mounts:GraphCanvasis not keyed byworkspaceId, so switching graphs reuses the same Cytoscape instance. The renderer policy therefore remains based on whichever graph happened to be open at mount.Examples:
pixelRatio,hideEdgesOnViewport, andtextureOnViewportremain in the small-graph configuration.This undermines the main optimization branch and makes benchmark results dependent on scenario order.
Required fix
Use an explicit renderer-policy lifecycle. Since several Cytoscape renderer initialization options are not safely mutable after creation, remount/recreate only when the policy tier changes—not on every graph update.
Inside
GraphCanvas, derive options from the passed tier rather than an initial ref:Before a tier-triggered remount, flush and restore:
Add hysteresis or stable tiers if filter changes near a threshold would cause repeated remounts.
Benchmark fix
The benchmark must randomize or explicitly test scenario order:
Assert the active renderer tier after each switch. Otherwise a fresh page per scenario can hide this production bug.
Acceptance criteria