We've seen some errors where the apps couldn't get installed when it was time for tests, so maybe this helps. Also installing the apps manually shouldn't be needed.
This bug only affects CJK languages and apart from DB growth, the symptom is that word filtering in app lists doesn't find affected apps because we look for a single whitespace between tokens
This code comes from SearchManager, but making it available in the DB library makes sense since the queries are specific to the DB implementation such as zero-whitespace hack.
An attempt to already test against a real in memory DB failed due to the module separation. So the search will be tested from two sides. This is the UI side and the DB side comes later.
in the rare case that a device has a very small screen and uses three button nav, so the nav is on the right side of the screen and overlays our content if we don't apply the proper padding insets
We tried doing it inside the DB library when the DB was opened, but that blocked all DB access for too long each cold start, so doing it on a worker thread some time after start seems like the better solution.
this is a bit hacky, but there seems to be very little information about this specific bug which affected several installs and either degraded search result quality or broke search completely.
In absence of a better fix or even a way to reproduce the issue, we are resorting to this.
Added indexes based on slow query logs and associated `EXPLAIN QUERY
PLAN` output.
Note: There are some composite primary keys with `repoId` +
`packageName` + ..., and we still ad an index on `packageName`.
This is because the order matters in composite keys. It might
be possible to restructure the primary key to be `packageName` +
`repoId` + ..., however this requires removing the table and
recreating it which is more complex then just adding an index on
`packageIndex` in addition to the primary key. There is also no
guarantee that things wont slow down when restructuring the primary key,
because there may be some cases where it is important that `repoId` is
first in that index.
Only enabled in debug mode. When auditing performance, make sure
to tune the parameters to the open helper. By default it will log
and explain queries that take more than 2s.