E3.16.3tree coupling stays responsivedesign

Coupling must stay responsive in a deep tree

Aliases: deep tree check · selection jank · check-down latency

What it is

Writing a whole branch down and recomputing ancestors up will hit tens of thousands of nodes on a deep, wide tree. Coupling must not therefore wait until the box looks dead, or until scrolling drops frames on a tick. Stay responsive means the first feedback sticks to the click: at least the parent’s own display becomes the target state at once. Writing a huge descendant set can finish a moment later, but not so silently that people click again. Performance is the condition on which coupling semantics are believed, not an optimisation to patch later.

Why it happens

A naive parent tick walks the whole branch and repaints every row. As node counts rise, the walk and layout block input. The causal window is short: if the box does not flip in that beat, people click again, two opposite couplings queue, and the set oscillates between all and none. The right split is: commit the intent first (parent goes definite, “applying to N items”), batch descendants in the model, then repaint only visible rows. Virtualization is an ally here: unseen rows need not have DOM yet, but their model bits must be written first, or expand and export will miss members.

Bubble-up likewise must not restyle the whole visible tree on every leaf click. Ancestors are few and cheap to compute; what is expensive is flushing style on every visible row.

Where it stops holding

Synchronous assistive speech that finishes reading “4000 items selected” before returning can be slower than paint; announcements should be summarised. On a server tree loaded lazily, subtrees not yet fetched must not pretend coupling is done; they should be filled in on fetch with failure rollback, or performance looks fine and the set is wrong. Acceptable delay is shorter on low-end devices; a development machine’s frame rate is not a pass. If coupling is implemented as one network request per node, no frontend speed will save it; the rule must declare a whole branch in one request.

Applying it

  • Flip the clicked node’s display immediately, then finish descendants asynchronously; do not leave the box on the old state in between.
  • Split model and view: write the selection set first, refresh visible rows by viewport.
  • Describe the whole branch in one intent (including subtree ids or a range); do not fire a request per leaf.
  • How to check: on a realistic deep tree, tick a high parent, record time from input to box flip, and export the selected count. A flip slow enough to provoke a second click, or a count that misses descendants, is performance breaking the semantics.

Related

  • Within the group: E3.16.1 Checking a parent usually selects all of its children · E3.16.2 A parent must show mixed when only some children are selected · E3.16.4 Users must be able to select a parent itself with no children
  • Adjacent: E4.18 Virtualized Long Lists · E4.06 Tree Controls
  • Search terms: tree selection performance · check-down latency · virtualized tree

Cards in the same group

Quick Actions

Share

Share this page

ios_share

https://hci.top/en/handbook/E3.16.3