Repository navigation
Data layer phase 2: Text in the host #425
Copy link
Copy link
Closed
5 / 55 of 5 issues completedMilestone
Description
Phase 2 of the data layer plan.
WebView sees: Text from outline and segment pages. Releasable because: only text moves; analysis is untouched. Needs: #407 (done).
Scope
The host fetches and tokenizes the text, and the WebView renders from an outline and segment pages. It can run alongside Phase 1.
- A
BookServicesubscribes toUSJ_Bookfor open books, runs extraction and tokenizing, and caches the tokenized book. It resegments per request from the boundary delta it's given, re-anchoring splits asreanchorSegmentationdoes today. getBookOutlineandgetSegments(text only) feed the segment list, height prediction, the chapter list and the continuous view. Host marks record page-fetch latency.- A temporary
getTokenizedBookgives the WebView whole tokenized books: for its reanchor passes anduseBookIndexesuntil 4c, and for its whole-text read (the concordance and the catalog's "Word not in the text" and draft-wide Stale filters) until 5d. From 4a, segment pages and their phrase spans (3l) feed the token-level maps. The WebView stops fetching USJ. onAnalysisChangedarrives here with its first producer: a Scripture edit names the whole book, and the WebView refetches.- A whole-text read in
BookServicereads every book, keeps a form-in-text index (the normalized forms the text holds), and reports progress and failed books throughgetTextReadStatus. Nothing calls it until 4a; thenopenSessionstarts it, 3j re-anchors each linked book as it arrives, and 5a and 5d answer from it. - These queries and the event are addressed by source project, since text needs no draft. They also accept a session from 3k, when analysis joins the segment pages; the source-project form is removed in 4c. Until 4c, boundary edits stay in the WebView draft, so the source-project form also takes the WebView's boundary delta: a boundary edit changes the request and the WebView refetches, and the import view sends none.
Done when: the WebView neither fetches nor tokenizes USJ, and no view walks the whole book except through getTokenizedBook.
Performance checkpoint
| After | What to check | Baseline (large-loadable) |
|---|---|---|
| Phase 2 | Book load, now split between host and WebView | Open to settled 3,266 / 3,302 ms |
Plan context
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity