performance enhancements and some bug fixes #225
No reviewers
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_whiteboard!225
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "integration"
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?
Dragging and mindmaps were slow because work scaled with board/tree size and ran unthrottled on every frame. No single commit regressed it — the cost was structural and grew with content. tools.js (drag/move hot path): - Snap guides: build the candidate-bounds list once at dragstart (was an O(n) findOne('.bg') tree search over all objects every frame), coalesce the dragmove burst into one render per animation frame, and reuse a pool of hidden/shown guide lines instead of destroying + recreating Konva.Line nodes each frame. Nodes moving with the drag are excluded from snap targets. - Disable the object layer's hit-graph redraw during a drag (listening(false) on dragstart, restored on dragend); drag/snap/connector events are dispatched by the drag system, not the hit graph, so they keep firing while the per-frame draw cost roughly halves. mindmap.js: - Memoize node text and description-height measurements. renderMindmap rebuilds the whole tree on every interaction (collapse, add, edit, remote sync); it was recreating a Konva.Text probe and rendering each node's markdown twice per render. Measurements are deterministic in (text, font), so cached entries need no invalidation. - Cache the mindmap group to a bitmap for the duration of its own drag, so each frame blits one image instead of redrawing every node + drop shadow; cleared on dragend to restore vector rendering.The drawing's invisible full-bbox rect was hit-listening, and a transparent Konva fill still registers pointer hits across its whole area — so a mousedown on empty space inside the bounding box grabbed the drawing and swallowed the rubber-band selection. Make that rect listening:false (it's only for sizing; findOne('.bg')/getClientRect/snapping/culling are unaffected) and give the ink lines a hitStrokeWidth of max(strokeWidth, 24) so the drawing is grabbed only on or near the strokes, while far-empty areas start a selection. #222