Semantic export stays linear on adversarial bodies. Release 0.5.1. #4

Closed
oliver.maklott wants to merge 0 commits from oliver.maklott/linear-export into main AGit

The semantic export runs in the app process on every saved body. Three of its steps were quadratic:

  • trailing blanks were trimmed with /[ \t]+$/ per line: a 200 KB line of blanks that ends in a letter took over 20 s;
  • the image pattern rescanned from every ![: 100,000 unclosed openers took 12 s;
  • overlapping spans were compared with every kept span.

All three are linear now. A path embedded many times builds and writes its representation once, and the output is assembled in one pass.

Tests: semantic_export.test.ts (23, two new).

🤖 Generated with Claude Code

https://claude.ai/code/session_01PVUe4ghusFjH71tHhZetH2

The semantic export runs in the app process on every saved body. Three of its steps were quadratic: - trailing blanks were trimmed with `/[ \t]+$/` per line: a 200 KB line of blanks that ends in a letter took over 20 s; - the image pattern rescanned from every `![`: 100,000 unclosed openers took 12 s; - overlapping spans were compared with every kept span. All three are linear now. A path embedded many times builds and writes its representation once, and the output is assembled in one pass. Tests: `semantic_export.test.ts` (23, two new). 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01PVUe4ghusFjH71tHhZetH2
Semantic export stays linear on adversarial bodies: trailing blanks are trimmed by a loop, image labels are bounded, overlapping spans are found in one pass, one representation per embedded path. Release 0.5.1.
Some checks failed
Publish / dev-image (pull_request) Successful in 1s
Publish / test (pull_request) Failing after 30s
Publish / worker-test (pull_request) Successful in 1m44s
Publish / pack-and-publish (pull_request) Has been skipped
Publish / build-sidecar (pull_request) Has been skipped
7624c6783f
A 200 KB line of blanks ending in a letter blocked the app process for
over twenty seconds (/[ \t]+$/ per line), 100,000 unclosed image
openers for twelve.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PVUe4ghusFjH71tHhZetH2
oliver.maklott closed this pull request 2026-11-15 16:46:18 +01:00
Some checks failed
Publish / dev-image (pull_request) Successful in 1s
Publish / test (pull_request) Failing after 30s
Publish / worker-test (pull_request) Successful in 1m44s
Publish / pack-and-publish (pull_request) Has been skipped
Publish / build-sidecar (pull_request) Has been skipped

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
limedoc-plugins/vectorsearch-lite!4
No description provided.