Uh oh!
There was an error while loading. Please reload this page.
perf(lnori): open novels fast on phones - #2446
Open
lipexama wants to merge 1 commit into
Open
Conversation
Building a chapter list downloaded every volume page at once (~0.5MB each, dozens for a long series) and parsed each whole page, only to read its table of contents. On mobile that meant ~a minute of loading skeletons, and any single failed request failed the entire novel. Parse just the page's <nav> table of contents (a few KB) when it can name every chapter, falling back to the full page when it cannot, and fetch volumes four at a time. Verified against the live site on four titles (Re:ZERO, Classroom of the Elite, 86, Mushoku Tensei): chapter lists are byte-identical to 1.0.0, with HTML handed to the parser dropping from 58.3MB to 0.4MB across the four. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
MonomoySama
commented
Aug 20, 2026
in my android 10 phone, opening any chapter gives me error "chapter section not found" but if i turn on VPN and open it again, it works |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Opening a novel on LNORI downloads every volume page at once (~0.5MB each, dozens for a long series) and fully parses each page with cheerio, only to read its table of contents. On a phone (Hermes, no JIT) that is ~a minute of loading skeletons for a series like Re:ZERO, and because the fetches run in one
Promise.all, a single failed request fails the entire novel.This change:
<nav>table of contents (a few KB) when it can name every chapter, falling back to the full page when it cannotVerification
Ran the published 1.0.0 build and this branch's compiled output side by side against the live site on four titles — Re:ZERO (305ch), Classroom of the Elite (345ch), 86 (187ch), Mushoku Tensei (418ch). Chapter lists are byte-identical in all four cases. HTML handed to cheerio across the four novels drops from 58.3MB to 0.4MB.
Also exercised in the app on an iOS simulator: browse → novel → chapter all work.
Checklist
🤖 Generated with Claude Code