By leaving the sorting to SQL, getting the Faces collection went from ~500 ms to ~220 ms on my i7 4790K.
It could be improved by doing in-query pagination (but that requires SQL wizardry, especially with SQLite).
Only doing the sorting on the relevant applications required some imagination (using a IN selector, and building and concatening a list manually). That is because each collection stores its own list of applications, but SQLite can't handle lists so we have to do that in Go.
As suggested by phpeter in #25.
By leaving the sorting to SQL, getting the Faces collection went from ~500 ms to ~220 ms on my i7 4790K.
It could be improved by doing in-query pagination (but that requires SQL wizardry, especially with SQLite).
Only doing the sorting on the relevant applications required some imagination (using a
IN
selector, and building and concatening a list manually). That is because each collection stores its own list of applications, but SQLite can't handle lists so we have to do that in Go.