report now shows [1/2] open and [2/2] read on the display scan and trees use, from the line naming the database until the summary line:
open covers a wait on a busy database.
read counts the records, then reads every record in the same read-only transaction, in signature order. That is the files_signature index read backwards, selecting only its columns, so SQLite neither sorts nor looks anything up in the table, and the read ends at exactly its count. TestSignatureRowsNeedNoSort checks the query plan.
report.go forms the groups from runs of records with one signature and holds only the groups of the size being read, writing them by first path before the next size. Records without a content hash are read and counted, then skipped. Rows go through the display's stdout writer from #113.
What the diff does not make obvious:
TestReportStdoutFailsWhileReading now gives each pair a size of its own, because rows are written only once their size has been read; it also checks that the read stopped short.
The test helper dupeGroups now reads the groups back from the rows readReport writes.
countingRecords is a constant because the linter asked for one once a third phase used the text; scan and trees use it too.
Judgement call: writing is part of read, not a phase of its own, since each size's rows are written while the read goes on.
Model: opus-5-5
Implements https://git.eeqj.de/sneak/sfdupes/issues/114.
`report` now shows `[1/2] open` and `[2/2] read` on the display `scan` and `trees` use, from the line naming the database until the summary line:
- `open` covers a wait on a busy database.
- `read` counts the records, then reads every record in the same read-only transaction, in signature order. That is the `files_signature` index read backwards, selecting only its columns, so SQLite neither sorts nor looks anything up in the table, and the read ends at exactly its count. `TestSignatureRowsNeedNoSort` checks the query plan.
`report.go` forms the groups from runs of records with one signature and holds only the groups of the size being read, writing them by first path before the next size. Records without a content hash are read and counted, then skipped. Rows go through the display's stdout writer from https://git.eeqj.de/sneak/sfdupes/issues/113.
What the diff does not make obvious:
- `TestReportStdoutFailsWhileReading` now gives each pair a size of its own, because rows are written only once their size has been read; it also checks that the read stopped short.
- The test helper `dupeGroups` now reads the groups back from the rows `readReport` writes.
- `countingRecords` is a constant because the linter asked for one once a third phase used the text; `scan` and `trees` use it too.
Judgement call: writing is part of `read`, not a phase of its own, since each size's rows are written while the read goes on.
Model: opus-5-5
report now runs in two phases, open and read, under the progress
display scan and trees use, until the summary line. open covers a wait
on a busy database. read counts the records, then reads them in the
same read-only transaction in signature order, the files_signature
index read backwards, so SQLite sorts nothing and the read ends at
exactly its count. The duplicate groups are formed in Go from runs of
equal signatures; only those of the size being read are held, and they
are written, ordered by first path, before the next size. The rows go
through the display's stdout writer. stdout and the summary line are
unchanged.
Judgement call: writing is part of read, not a phase of its own, since each size's rows are written while the read goes on.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Implements #114.
reportnow shows[1/2] openand[2/2] readon the displayscanandtreesuse, from the line naming the database until the summary line:opencovers a wait on a busy database.readcounts the records, then reads every record in the same read-only transaction, in signature order. That is thefiles_signatureindex read backwards, selecting only its columns, so SQLite neither sorts nor looks anything up in the table, and the read ends at exactly its count.TestSignatureRowsNeedNoSortchecks the query plan.report.goforms the groups from runs of records with one signature and holds only the groups of the size being read, writing them by first path before the next size. Records without a content hash are read and counted, then skipped. Rows go through the display's stdout writer from #113.What the diff does not make obvious:
TestReportStdoutFailsWhileReadingnow gives each pair a size of its own, because rows are written only once their size has been read; it also checks that the read stopped short.dupeGroupsnow reads the groups back from the rowsreadReportwrites.countingRecordsis a constant because the linter asked for one once a third phase used the text;scanandtreesuse it too.Judgement call: writing is part of
read, not a phase of its own, since each size's rows are written while the read goes on.Model: opus-5-5
Review passed.
Model: opus-5-5