Skip to content

fix(extraction): a file over the size limit is never read (#1910) - #1915

Closed
danusha2345 wants to merge 9 commits into
colbymchenry:mainfrom
danusha2345:fix/1910-stat-before-read
Closed

danusha2345 wants to merge 9 commits into
colbymchenry:mainfrom
danusha2345:fix/1910-stat-before-read

Conversation

@danusha2345

@danusha2345 danusha2345 commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

What

The second defect from #1910 (the first, MPEG-TS detection, is #1914 — this PR is stacked on it because both touch the batch reader).

MAX_FILE_SIZE was enforced after readFile, so a committed video or blob fixture over the limit was decoded into a JS string in full — the issue measured 3.4 GB of RSS for one 400 MB .ts, 3.5 GB for ten 60 MB fixtures in one I/O batch, and a hard Invalid string length failure past ~512 MB — only to be stored as size_exceeded and discarded. Tracing the indexer on a sparse 400 MB file showed it was then read again by every pass that scans files by name: the framework detectors' readFile and the resolver's cached reader. Three full passes, 153 603 read(2) calls, 1.26 GB through the page cache for one file.

Change

Stat first, everywhere a source file is read by path:

  • batch reader and extractFile — an oversize file is stored as skipped with a size stamp (codegraph:oversize:<bytes>) standing in for its content; it is never opened for reading.
  • change detection (sync path, git fast path, full-scan fallback) hashes the same stamp, so the stored hash and the detected hash agree: a same-size rewrite of a file nothing is indexed from is not a change, crossing the limit in either direction is (covered by the test: over → under → over).
  • framework-detection readFile and the resolver's readFileCached return null above the limit instead of decoding. The resolver hunk is byte-identical to the one in fix: bound large-repo memory and traversal work #1583, so the two merge cleanly whichever lands first.
  • The limit moves to src/file-limits.ts (MAX_SOURCE_FILE_SIZE_BYTES), same file and name as fix: bound large-repo memory and traversal work #1583, so the three sites share one number.

Upgrade note: an index written before this change stored the hash of an oversize file's real bytes; change detection now hashes the stamp, so each such file shows as modified once after upgrading and the next sync stores the stamp — a one-time pass that no longer reads the file.

Files under the limit are read exactly as before; .ts files still get the ≤752-byte MPEG-TS sniff from #1914.

Verification

  • strace -f on codegraph init over ok.ts + a sparse 400 MB huge.ts: reads of the big file 153 603 → 0 (one openat remains: the MPEG-TS head sniff).
  • New __tests__/oversize-file-not-read.test.ts: neighbours indexed, the oversize record carries the stamp hash and no nodes, getChangedFiles() is empty right after indexing, same-size rewrite is not a change, shrinking under the limit makes it ordinary source (symbols appear after sync), growing back over it drops them again; a 400 MB sparse fixture indexes in under 5 s with < 100 MB RSS growth after a warm-up init.
  • tsc clean; extraction, sync, git-index-currency, sync-rebuild-convergence, resolution, index-command, frameworks-integration, mpeg-ts-not-typescript + the new file: 9 files / 978 tests pass.

Fixes the remaining half of #1910.

🤖 Generated with Claude Code

@danusha2345

Copy link
Copy Markdown
Contributor Author

Rebased onto the updated #1914 (10def05) and tidied (0593f9e): readSourceOrStamp lost an argument no caller passed, and the batch reader's comments are back in the order the code runs. Added an upgrade note to the description: an existing index shows each oversize file as modified once, then stores the stamp. Suites green on both arms (980 tests each).

@danusha2345

danusha2345 commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor Author

Ported the bounded-read hardening from #1919 (3b0878e): every source read goes through readBoundedSource/readBoundedSourceSync, which re-checks the open descriptor and stops one byte past the limit, so a file that grows after the stat is still stamped as oversize. I also bounded the two parse-retry re-reads, which #1919 still does with fsp.readFile (3bcf88e on this branch). The sparse 400 MB fixture test stays.

@inth3shadows inth3shadows left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this on Linux with Node 22, merged onto current main. Bounding the reads and the size stamp both look right. I found four problems:

  1. Breaks an existing test. git-index-currency.test.ts › keeps a committed path pending when sync cannot read it fails every time on this branch and passes on main (expected 0 to be greater than 0). The test injects its read error on fs.readFileSync, but sync now reads through readBoundedSourceSync (openSync/readSync), so the error never fires. The pending-path behavior itself still holds: moving the injection to fs.openSync makes the test pass.
  2. The viewer reports false drift for files between 1 and 8 MB. The stored contentHash of an oversize file is now the hash of the size stamp. readFileShape and hasDriftedOnDisk in src/ui-server/api/source.ts still hash the real bytes. For an unchanged 1.4 MB big.js, readFileShape returns drift: true ("This file changed on disk after the last index sync…"); on main it returns drift: false.
  3. The MPEG-TS check can drop a valid .ts file. A TypeScript file with G at bytes 0/188/376/564 (four 188-byte lines each starting with G) and one raw NUL inside a comment is treated as video. Its export function realFn() is not indexed; on main it is. It's contrived, but a stricter check (for example more packets, or checking the PID/continuity fields) would rule it out.
  4. Changelog style. The two new entries include benchmark figures ("a 400 MB fixture cost 3.4 GB of memory", "about 28 seconds"). The changelog rules in AGENTS.md exclude benchmark numbers from entries.

danusha2345 pushed a commit to danusha2345/codegraph that referenced this pull request Sep 27, 2026
colbymchenry#1910)

Review on colbymchenry#1915: the sniff took four aligned 0x47 sync bytes plus any NUL
as proof of a transport stream, so TypeScript with a `G` at four 188-byte
strides and one raw NUL in a comment was dropped unindexed. The sniff now
needs the sync byte on sixteen consecutive packets (3 KB of head) and at
least 1/64 of the head to be control bytes. Compressed payload carries
8-20% of them (checked on ffmpeg-made H.264/AAC, MPEG-2 and MP2 streams);
source text carries none. A shorter clip is cheap to parse anyway.

Also drops the benchmark figures from the changelog entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
danusha2345 pushed a commit to danusha2345/codegraph that referenced this pull request Sep 27, 2026
…here (colbymchenry#1910)

Review on colbymchenry#1915:

- The viewer (readFileShape, hasDriftedOnDisk, the source endpoint) and
  MCP's drift gate hashed a file's real bytes, but the index stores the
  size stamp for a file over the limit, so every unchanged 1-8 MB file read
  as "changed on disk". oversizeStamp moves to file-limits.ts with an
  indexedHashInput helper, and all four checks hash what the index stored.
  An oversize file is now compared without being read.
- git-index-currency's "keeps a committed path pending when sync cannot
  read it" injected its failure only into readFileSync, which the bounded
  reader no longer calls, so it failed. The failure now reaches openSync
  too.
- The changelog entry drops its benchmark figures.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@danusha2345

Copy link
Copy Markdown
Contributor Author

Thanks for the careful review. All four points are addressed:

  1. git-index-currency test (5f5cd77): the read failure is now injected at fs.openSync as well as readFileSync, so it reaches the bounded reader. 13/13 pass.
  2. False drift for 1–8 MB files (5f5cd77): oversizeStamp moved to src/file-limits.ts, next to a small indexedHashInput(size, content) helper. All four places that compare a file on disk with its stored hash now hash what the index stored: readFileShape, hasDriftedOnDisk and the source endpoint in ui-server/api/source.ts, plus MCP's isFileStaleOnDisk. An oversize file is compared by its stamp without being read. The new test touches an unchanged 1.4 MB big.js: readFileShape, hasDriftedOnDisk and MCP all report no drift, and appending one line makes it drift. The test fails without the change.
  3. MPEG-TS false positive (03eecf6 on fix(extraction): an MPEG-TS video named .ts is not TypeScript (#1910) #1914, merged here): the sniff now needs the sync byte on 16 consecutive packets (3 KB) and at least 1/64 of the head to be control bytes, instead of 4 packets plus any NUL. Your counterexample (G at every stride plus a NUL in a comment) now stays TypeScript at 4, 16 and 20 strides, and its realFn is indexed. ffmpeg-made H.264/AAC, MPEG-2 and MP2 streams have 8–20% control bytes and are still recognised, as is a head that opens with 0xFF-stuffed PAT/PMT packets. A .ts clip shorter than 3 KB is parsed, which is cheap.
  4. Changelog: both entries lost their figures.

Full suite on this branch (Linux, Node 22, native kernel): 4737 passed, 11 skipped.

danusha2345 pushed a commit to danusha2345/codegraph that referenced this pull request Sep 27, 2026
colbymchenry#1910)

Review on colbymchenry#1915: the sniff took four aligned 0x47 sync bytes plus any NUL
as proof of a transport stream, so TypeScript with a `G` at four 188-byte
strides and one raw NUL in a comment was dropped unindexed. The sniff now
needs the sync byte on sixteen consecutive packets (3 KB of head) and at
least 1/64 of the head to be control bytes. Compressed payload carries
8-20% of them (checked on ffmpeg-made H.264/AAC, MPEG-2 and MP2 streams);
source text carries none. A shorter clip is cheap to parse anyway.

Also drops the benchmark figures from the changelog entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
danusha2345 pushed a commit to danusha2345/codegraph that referenced this pull request Sep 27, 2026
…here (colbymchenry#1910)

Review on colbymchenry#1915:

- The viewer (readFileShape, hasDriftedOnDisk, the source endpoint) and
  MCP's drift gate hashed a file's real bytes, but the index stores the
  size stamp for a file over the limit, so every unchanged 1-8 MB file read
  as "changed on disk". oversizeStamp moves to file-limits.ts with an
  indexedHashInput helper, and all four checks hash what the index stored.
  An oversize file is now compared without being read.
- git-index-currency's "keeps a committed path pending when sync cannot
  read it" injected its failure only into readFileSync, which the bounded
  reader no longer calls, so it failed. The failure now reaches openSync
  too.
- The changelog entry drops its benchmark figures.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
danusha2345 pushed a commit to danusha2345/codegraph that referenced this pull request Sep 27, 2026
danusha2345 pushed a commit to danusha2345/codegraph that referenced this pull request Sep 27, 2026
colbymchenry#1910)

Review on colbymchenry#1915: the sniff took four aligned 0x47 sync bytes plus any NUL
as proof of a transport stream, so TypeScript with a `G` at four 188-byte
strides and one raw NUL in a comment was dropped unindexed. The sniff now
needs the sync byte on sixteen consecutive packets (3 KB of head) and at
least 1/64 of the head to be control bytes. Compressed payload carries
8-20% of them (checked on ffmpeg-made H.264/AAC, MPEG-2 and MP2 streams);
source text carries none. A shorter clip is cheap to parse anyway.

Also drops the benchmark figures from the changelog entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
danusha2345 pushed a commit to danusha2345/codegraph that referenced this pull request Sep 27, 2026
…here (colbymchenry#1910)

Review on colbymchenry#1915:

- The viewer (readFileShape, hasDriftedOnDisk, the source endpoint) and
  MCP's drift gate hashed a file's real bytes, but the index stores the
  size stamp for a file over the limit, so every unchanged 1-8 MB file read
  as "changed on disk". oversizeStamp moves to file-limits.ts with an
  indexedHashInput helper, and all four checks hash what the index stored.
  An oversize file is now compared without being read.
- git-index-currency's "keeps a committed path pending when sync cannot
  read it" injected its failure only into readFileSync, which the bounded
  reader no longer calls, so it failed. The failure now reaches openSync
  too.
- The changelog entry drops its benchmark figures.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@danusha2345
danusha2345 force-pushed the fix/1910-stat-before-read branch from 5f5cd77 to 183aa84 Compare September 27, 2026 15:07
danusha2345 and others added 9 commits September 28, 2026 21:16
…chenry#1910)

`.ts` mapped to TypeScript by extension alone, so MPEG transport-stream
fixtures (`testdata/*.ts`) were parsed by tree-sitter: ~28 s of CPU for a
900 KB clip, minutes for a directory of them, for zero symbols.

Recognise the stream from the head of the file — the 0x47 sync byte at
offsets 0, 188, 376 and 564 plus a NUL byte, which every stream carries in
its first packets and UTF-8 source never does — and drop it at discovery:
not indexed, not parsed, not counted, not tallied as an unsupported
language. The check reads under 1 KB and only for `.ts` files; the batch
reader sniffs the bytes it already read, and the single-file path (sync,
watcher) does the same head read, so a clip handed in by name is skipped
too. The skip happens before parse dispatch, so no kernel mirror is needed.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…oped sync

Review found two places that decide "is this a source file" without the
MPEG-TS check the scan applies: the git fast path's candidate loop in
getChangedFiles and the scoped-sync path filter (watcher events). An
untracked clip in a git repo was reported as `added`, skipped by sync
without a record, and reported as `added` again on every status; a tracked
.ts that became a clip stayed `modified` with its stale nodes. Both now
treat the clip as non-source: removed when tracked, ignored otherwise.

Regression tests fail without this change and pass with it, on both arms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
colbymchenry#1910)

Review on colbymchenry#1915: the sniff took four aligned 0x47 sync bytes plus any NUL
as proof of a transport stream, so TypeScript with a `G` at four 188-byte
strides and one raw NUL in a comment was dropped unindexed. The sniff now
needs the sync byte on sixteen consecutive packets (3 KB of head) and at
least 1/64 of the head to be control bytes. Compressed payload carries
8-20% of them (checked on ffmpeg-made H.264/AAC, MPEG-2 and MP2 streams);
source text carries none. A shorter clip is cheap to parse anyway.

Also drops the benchmark figures from the changelog entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ry#1910)

The size gate ran after `readFile`, so a committed video or blob fixture was
decoded in full — 3.4 GB of RSS for a 400 MB file, `Invalid string length`
past ~512 MB — only to be stored as skipped. It was then read again by every
pass that scans files by name: the framework detectors' `readFile` and the
resolver's cached reader, three full passes on the reporter's fixtures.

Stat first, everywhere a source file is read by path: the batch reader and
`extractFile` store an oversize file with a size stamp in place of its
content, change detection hashes the same stamp (so a same-size rewrite of a
file nothing is indexed from is not a change, while crossing the limit in
either direction is), and both by-name readers return null above the limit.
The limit moves to `src/file-limits.ts` so the three sites share one number.

strace on a sparse 400 MB `.ts`: 153 603 reads before, 0 after; indexing it
next to a real file costs no measurable RSS. Stacked on colbymchenry#1914, which shares
the batch-reader hunk.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ation order

`readSourceOrStamp` took a `stats` argument no caller passed and returned
stats no caller read; it now returns the text or stamp change detection
hashes. The batch reader's two comments are back in the order its code runs:
the size gate, then the MPEG-TS head check. No behaviour change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…olbymchenry#1910)

A file can grow between the stat that gates the size limit and the read
that follows (a log, a download, a build output being written). Every
source read now goes through readBoundedSource/readBoundedSourceSync: the
open descriptor is re-checked, and the read stops one byte past the limit,
so an oversize file is still stamped rather than decoded. The extraction
batch reader, single-file extraction, framework detectors and the resolver's
file cache all use it. Ported from the maintainer's hardening of this fix
in colbymchenry#1919.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The retry passes for files whose worker crashed or timed out re-read the
source with an unbounded fsp.readFile. The file can have grown since the
first, bounded read; an oversize file is now skipped by the retry instead
of being decoded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…here (colbymchenry#1910)

Review on colbymchenry#1915:

- The viewer (readFileShape, hasDriftedOnDisk, the source endpoint) and
  MCP's drift gate hashed a file's real bytes, but the index stores the
  size stamp for a file over the limit, so every unchanged 1-8 MB file read
  as "changed on disk". oversizeStamp moves to file-limits.ts with an
  indexedHashInput helper, and all four checks hash what the index stored.
  An oversize file is now compared without being read.
- git-index-currency's "keeps a committed path pending when sync cannot
  read it" injected its failure only into readFileSync, which the bounded
  reader no longer calls, so it failed. The failure now reaches openSync
  too.
- The changelog entry drops its benchmark figures.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…mchenry#1910)

colbymchenry#2043's answer-freshness check hashes each contributing file whole and
compares it with the stored contentHash. For a file over the index's size
limit the stored hash is the size stamp, so an unchanged oversize file
would read as stale. Compare it by its stamp, without reading it, like
the viewer and the MCP drift gate do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@danusha2345
danusha2345 force-pushed the fix/1910-stat-before-read branch from 183aa84 to 5915534 Compare September 28, 2026 18:25
colbymchenry added a commit that referenced this pull request Sep 29, 2026
….ts is not TypeScript (#1910) (#2082)

* fix(extraction): an MPEG-TS video named .ts is not TypeScript (#1910)

`.ts` mapped to TypeScript by extension alone, so MPEG transport-stream
fixtures (`testdata/*.ts`) were parsed by tree-sitter: ~28 s of CPU for a
900 KB clip, minutes for a directory of them, for zero symbols.

Recognise the stream from the head of the file — the 0x47 sync byte at
offsets 0, 188, 376 and 564 plus a NUL byte, which every stream carries in
its first packets and UTF-8 source never does — and drop it at discovery:
not indexed, not parsed, not counted, not tallied as an unsupported
language. The check reads under 1 KB and only for `.ts` files; the batch
reader sniffs the bytes it already read, and the single-file path (sync,
watcher) does the same head read, so a clip handed in by name is skipped
too. The skip happens before parse dispatch, so no kernel mirror is needed.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* fix(extraction): a video .ts is never pending on the git path or a scoped sync

Review found two places that decide "is this a source file" without the
MPEG-TS check the scan applies: the git fast path's candidate loop in
getChangedFiles and the scoped-sync path filter (watcher events). An
untracked clip in a git repo was reported as `added`, skipped by sync
without a record, and reported as `added` again on every status; a tracked
.ts that became a clip stayed `modified` with its stale nodes. Both now
treat the clip as non-source: removed when tracked, ignored otherwise.

Regression tests fail without this change and pass with it, on both arms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(extraction): require a binary head before calling a .ts file video (#1910)

Review on #1915: the sniff took four aligned 0x47 sync bytes plus any NUL
as proof of a transport stream, so TypeScript with a `G` at four 188-byte
strides and one raw NUL in a comment was dropped unindexed. The sniff now
needs the sync byte on sixteen consecutive packets (3 KB of head) and at
least 1/64 of the head to be control bytes. Compressed payload carries
8-20% of them (checked on ffmpeg-made H.264/AAC, MPEG-2 and MP2 streams);
source text carries none. A shorter clip is cheap to parse anyway.

Also drops the benchmark figures from the changelog entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(extraction): a file over the size limit is never read (#1910)

The size gate ran after `readFile`, so a committed video or blob fixture was
decoded in full — 3.4 GB of RSS for a 400 MB file, `Invalid string length`
past ~512 MB — only to be stored as skipped. It was then read again by every
pass that scans files by name: the framework detectors' `readFile` and the
resolver's cached reader, three full passes on the reporter's fixtures.

Stat first, everywhere a source file is read by path: the batch reader and
`extractFile` store an oversize file with a size stamp in place of its
content, change detection hashes the same stamp (so a same-size rewrite of a
file nothing is indexed from is not a change, while crossing the limit in
either direction is), and both by-name readers return null above the limit.
The limit moves to `src/file-limits.ts` so the three sites share one number.

strace on a sparse 400 MB `.ts`: 153 603 reads before, 0 after; indexing it
next to a real file costs no measurable RSS. Stacked on #1914, which shares
the batch-reader hunk.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* refactor(extraction): one-purpose size-stamp reader, comments in operation order

`readSourceOrStamp` took a `stats` argument no caller passed and returned
stats no caller read; it now returns the text or stamp change detection
hashes. The batch reader's two comments are back in the order its code runs:
the size gate, then the MPEG-TS head check. No behaviour change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(extraction): bound the read itself, not only the stat before it (#1910)

A file can grow between the stat that gates the size limit and the read
that follows (a log, a download, a build output being written). Every
source read now goes through readBoundedSource/readBoundedSourceSync: the
open descriptor is re-checked, and the read stops one byte past the limit,
so an oversize file is still stamped rather than decoded. The extraction
batch reader, single-file extraction, framework detectors and the resolver's
file cache all use it. Ported from the maintainer's hardening of this fix
in #1919.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(extraction): bound the parse-retry reads too (#1910)

The retry passes for files whose worker crashed or timed out re-read the
source with an unbounded fsp.readFile. The file can have grown since the
first, bounded read; an oversize file is now skipped by the retry instead
of being decoded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(extraction): check an oversize file against its size stamp everywhere (#1910)

Review on #1915:

- The viewer (readFileShape, hasDriftedOnDisk, the source endpoint) and
  MCP's drift gate hashed a file's real bytes, but the index stores the
  size stamp for a file over the limit, so every unchanged 1-8 MB file read
  as "changed on disk". oversizeStamp moves to file-limits.ts with an
  indexedHashInput helper, and all four checks hash what the index stored.
  An oversize file is now compared without being read.
- git-index-currency's "keeps a committed path pending when sync cannot
  read it" injected its failure only into readFileSync, which the bounded
  reader no longer calls, so it failed. The failure now reaches openSync
  too.
- The changelog entry drops its benchmark figures.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(mcp): check an oversize answer file against its size stamp (#1910)

#2043's answer-freshness check hashes each contributing file whole and
compares it with the stored contentHash. For a file over the index's size
limit the stored hash is the size stamp, so an unchanged oversize file
would read as stale. Compare it by its stamp, without reading it, like
the viewer and the MCP drift gate do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* perf(extraction): judge a .ts clip from the bytes it is read for, not at discovery (#1910)

Discovery sniffed the head of every `.ts` file on every full scan — an
open + 3 KB read + close per file, before anything asked for its content.
On a 10k-file TypeScript tree that took a warm-cache scan from ~105 ms to
~243 ms; on a slow disk or a network share it is a random read per file
per scan, the access pattern #1231 and the SMB reports (#1014, #448) are
about.

The bytes are now judged where they are read anyway, so the check costs no
I/O and runs only for a file that is new or changed: the batch reader (as
before), `indexFile`, the sync reconcile (an untracked clip is skipped, a
tracked file that became one is removed through the same removal path as
a deletion), and both `getChangedFiles` paths. The scan lists `.ts` files
by name again; a test pins that discovery opens none of them on the walk
or the git path. Scan time is back to main's (~98 ms), and a full index is
unchanged within noise.

Also collapses the four #1910 changelog bullets (#1914 and #1915 each added
both) to two, without the benchmark figures.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: danusha2345 <danusha2345@users.noreply.github.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: danusha2345 <ewidusoc498@gmail.com>
@colbymchenry

Copy link
Copy Markdown
Owner

Thanks @danusha2345 — this landed in #2082 with all your commits and authorship kept, rebased onto current main. I added one commit on top: discovery was reading the first 3 KB of every .ts file on every full scan (a 10k-file tree went from ~105 ms to ~243 ms, and on a slow disk it's a random read per file), so the video check now runs on the bytes each file is already being read for. Scan time is back to main's and a full index is unchanged. Fixes #1910.

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.

3 participants