Overview
| Comment: | large files arrive: size-gate the highlighter and cache it by content
Highlighting was paid on every request with no cache, and its cost tracks token density: sqlite's btree.c, 407KB of dense C, took 490ms and rendered 2.3MB of HTML. Past 256KB the lexer is skipped and the page says so; below it, identical content is highlighted once. |
|---|---|
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
f4e226e5a4d87313dab270a98f44c4a5 |
| User & Date: | quarry on 2026-08-31 12:18:02.599 |
| Other Links: | manifest | tags |
Context
|
2026-08-31
| ||
| 12:25 |
the highlight gate is a safety valve, not a policy
256KB turned ten of sqlite's src files permanently grey, which trades the feature for the fix. Raised to 2MB; the per-blob cache carries the cost until windowing removes the need for a threshold at all. check-in: 937b10d6de user: quarry tags: trunk | |
| 12:18 |
large files arrive: size-gate the highlighter and cache it by content
Highlighting was paid on every request with no cache, and its cost tracks token density: sqlite's btree.c, 407KB of dense C, took 490ms and rendered 2.3MB of HTML. Past 256KB the lexer is skipped and the page says so; below it, identical content is highlighted once. check-in: f4e226e5a4 user: quarry tags: trunk | |
|
2026-08-30
| ||
| 15:50 | land landing-ping check-in: c53a183de9 user: dmestas tags: trunk | |
Changes
Modified docs/api.md
from [2c8e38359d]
to [b094c40081].
[diff]
Modified internal/api/register.go
from [c2e899f621]
to [526e68fe6e].
[diff]
Added internal/highlight/gate_test.go version [8f27767196].
Modified internal/highlight/highlight.go
from [9371ba717e]
to [90bb2a1d59].
[diff]
Modified internal/web/web.go
from [37c902724f]
to [8e076a8725].
[diff]