This Engineering Notebook post discusses the aftermath of PR
#2803, containing a huge speedup in qtree.redraw_after_icons_changed.
tl;dr: redraw_after_icons_changed is a faux helper!
Background
The old code (qtree.redraw_after_icons_changed) updated all visible nodes in the entire tree, a huge waste of time. Instead, the new code updates only c.p and its direct parents.
However, the new code is dubious, because p.setAllAncestorAtFileNodesDirty is complicated. It can "dirty" nodes far outside of c.p's ancestors or descendants.
Aha: updating icons is easier without a helper
The new version of qtree.redraw_after_icons_changed just calls qtree.updateIcon(p) for a few positions. But there are two Ahas:
Aha 1: Calling updateIcon(p) would be easy to do anywhere!
Aha 2:
qtree.redraw_after_icons_changed can't know which positions to update!
In short: redraw_after_icons_changed is a faux helper.
Summary
There is no need for AI in a faux helper.
Leo's core code will call c.updateIcon(p) directly.
Finding that code is easy: just look calls for the faux helper!
I'll soon retire all x.redraw_after_icons_changed methods.
Edward