Skip to content

Keep the archive sources' row counts until a row is written - #258

Merged
abrignoni merged 1 commit into
mainfrom
perf/archive-source-counts
Oct 1, 2026
Merged

abrignoni merged 1 commit into
mainfrom
perf/archive-source-counts

Conversation

@abrignoni

Copy link
Copy Markdown
Owner

Keeps each archive source's row counts until a row is written to the case.

  • archive.source_status counted the source's rows by origin on every context request, a 59 ms pass on a case of 149,824 rows.
  • The counts now go through CaseDB.derived. A repeated /api/context on that case went from 61 ms to about 2 ms.
  • Whether the archive is still where the case recorded it is checked on every call, as before.
  • The rules file records the waiting measured on a real case.

Co-Authored-By: Claude Opus 5.5 [email protected]

archive.source_status counted each archive source's rows by origin on
every call, and the gallery asks for it with every context. On a case of
149,824 rows from one archive that was a 59 ms pass, so a repeated
/api/context still took 61 ms there and reads beside it waited a median
of 49 ms.

The counts are kept through CaseDB.derived now. A repeated context takes
1.5 to 2.3 ms on that case and reads no row of files. Whether the
archive is where the case recorded it is still looked at on every call.

The rules file records the waiting measured on that case and why a read
connection per thread was not built.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@abrignoni
abrignoni merged commit b878f4e into main Oct 1, 2026
8 checks passed
@abrignoni
abrignoni deleted the perf/archive-source-counts branch October 1, 2026 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant