As shown in this flame graph, in a huge diagram, we spend substantial amount of time to re-compute canvas viewport (after select) and determine context pad position (to update it):
All this happens within the user transaction, and blocks UI interactivity.
With this PR we batch position updates as we batch visibility updates; we'll otherwise force the browser into expensive in-frame repaints:
Proposed Changes
As shown in this flame graph, in a huge diagram, we spend substantial amount of time to re-compute canvas viewport (after select) and determine context pad position (to update it):
All this happens within the user transaction, and blocks UI interactivity.
With this PR we batch position updates as we batch visibility updates; we'll otherwise force the browser into expensive in-frame repaints:
Related to https://github.com/bpmn-io/diagram-js/pull/915, https://github.com/camunda/camunda-modeler/issues/4335.
Checklist
To ensure you provided everything we need to look at your PR:
@bpmn-io/sr
toolCloses {LINK_TO_ISSUE}
orRelated to {LINK_TO_ISSUE}