Fixed
recent_itemson the SQLite backend readsitemsin the cheaper order for the scope. Ranking a large personal library walked the(libraryID, key)index and fetched every row by rowid, which @mronkko profiled at 94 ms on a 52k-of-90k-item library, against 31 ms for a plain table scan with anitemTypeIDsubquery. The query now filters onitemTypeIDdirectly and uses a full scan when the library is at least a fifth ofitems, keeping the index for small scopes such as a group library inside a large database. Both plans return the same items.
Added
scripts/profile_recent_items.pyshows whererecent_itemsspends its time on the SQLite backend: per-statement timings, query plans, the sort versus the scan, the tools' path throughget_library_backend(), and the cost of a snapshot refresh. By @mronkko in #554.
Full changelog: v0.12.2...v0.12.3