The filter of the settings window: one linear pass per change. More...
| Header: | #include <ConfigFilterProxy> |
| Inherits: | QSortFilterProxyModel |
QSortFilterProxyModel with recursive filtering walks the tree with no memory for each row and checks each ancestor, three to four calls of filterAcceptsRow() per row on each keystroke (config-ui §CFGV-4). This proxy keeps recursive filtering off. On a change of the text, of "Changed only" or of "Show advanced", it makes one pass over the setting nodes of the source:
The pass is runFilterPass(), a pure function over the model's immutable FilterIndex. From ASYNC_NODES nodes it runs on a worker, because the release benchmark measured 50 ms at 1 000 000 settings (gate §CFGW-2). The GUI thread makes the input, the worker makes the bits, and the GUI thread applies them. A newer pass makes an older one stop.
The bits change only in a pass, so an edit never hides the row it edits, even with dynamicSortFilter set. With "Changed only", a row reset to its default stays until the next pass.