v0.20.10
See CHANGELOG.md for full history.
-
Changed — reordering an area in the sidebar reads the sidebar the way a screen reader would, instead of the way a web crawler does. Every time the command needed to know where the areas were — before each scroll, after each fold, before each hop — it read the CONTENT of every row in the sidebar. On a large sidebar that is around 900 requests to Things and 16–18 seconds, each time, because the expensive part is not asking but making the app draw a row it was not drawing. A single move to the end of a 174-row sidebar took over seven minutes on real hardware, and the gestures were about five seconds of it.
It now reads the POSITION of every row — which costs nothing, because positions need no drawing — and reads the content only of the rows it believes are the areas, which it predicts from the order the database already holds and then confirms by reading them. If any one of them is not what was predicted, it falls back to the full read it always did, and says so in the trace. The scroll, the wheel fallback and the disclosure arrow are addressed the same way: they no longer re-read the whole sidebar to find it, and each confirms it is aimed at the right list by reading exactly one row first.
Waiting is now the app's job too: after clicking a disclosure arrow the command waits for Things to say the row count changed rather than for a fixed six-tenths of a second, on the Macs that can listen. Where nothing can listen — a Mac without the developer tools, or one where the helpers carry the automation — it waits exactly as long as it did before. Refs #676.
-
Added —
THINGS_API_TRACE=1now says what one sidebar move cost. Each move records how many times it read the sidebar and how each read was answered (predicted, or fallen back to the full read), how many requests it made to Things and how many rows it made the app draw, how many gestures it sent, and whether each wait ended because the app said something or because a timer ran out. Those are the numbers that transfer between machines, so a move's cost on a real Mac can be read off the trace instead of estimated.THINGS_API_SIDEBAR_SPARSE=0turns the predicted reads off entirely and restores the previous behavior. Refs #676.