You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Redundant sequential SQLite file opens and identical SELECT queries #738
When opening the conjugation table for a verb, ConjugationSelectionScreen sequentially opens and closes the SQLite database file from disk multiple times in a row (once for every single conjugation form in the table).
On each iteration, getTheValueForTheConjugateWord executes SELECT * FROM verbs WHERE infinitive = ?, loads the full row into memory, reads only a single column, and discards the rest of the retrieved row before closing the database. Re-opening the database file and re-running the exact same query multiple times sequentially causes unnecessary disk I/O overhead, GC churn, and performance issues.
Because all conjugation forms for a verb are already stored within a single row in the SQLite table, the entire table can be populated in one single query and one database open instead of multiple sequential disk opens.
Proposed Solution
Open the SQLite database once. Query the verb row once with SELECT * FROM verbs WHERE infinitive = ?. Resolve all conjugation forms in-memory from the returned row data. Close the database once.
@andrewtavis I had a look at #715, but this is actually a separate client-side bottleneck. While #715 updates the data contracts, the screen still queries the database repeatedly in a loop for each individual form instead of fetching everything in one go.
we might want to look into optimizing this as well.
Activity
andrewtavis commentedon Oct 20, 2026
Thanks @ashb155! I assume that this is going to be fixed by #715, which closes #714 and #598. We just need the new contracts to be finalized in scribe-org/Scribe-Server#114 :)
ashb155 commentedon Oct 20, 2026
@andrewtavis I had a look at #715, but this is actually a separate client-side bottleneck. While #715 updates the data contracts, the screen still queries the database repeatedly in a loop for each individual form instead of fetching everything in one go.
we might want to look into optimizing this as well.
andrewtavis commentedon Oct 20, 2026
Ok, sounds good, @ashb155! Let's wait till #715 is in and then start here :)
ashb155 commentedon Oct 20, 2026
have blocked the issue for now @andrewtavis , we can take it up once #715 is finalized!
andrewtavis commentedon Oct 20, 2026
Nice @ashb155! I added the caution note to the issue text with a
-to render the issue name and status so it's easy to keep track of 😊