[MN-10] Performance: Large EPUB Parsing #7

Open
opened 2026-05-05 12:15:04 +00:00 by mjasin · 0 comments
Owner

Full Detail: EpubService.cs currently uses EpubReader.ReadBookAsync(fullPath) (line 52), which loads the entire EPUB file into memory. This is a performance risk for large books (>10MB).

Action:

  • Refactor to use EpubReader.OpenBook(fullPath), which provides a handle to the file without reading all content.
  • Read only the specific ReadingOrder item requested by chapterIndex on demand.
**Full Detail:** `EpubService.cs` currently uses `EpubReader.ReadBookAsync(fullPath)` (line 52), which loads the entire EPUB file into memory. This is a performance risk for large books (>10MB). **Action:** - Refactor to use `EpubReader.OpenBook(fullPath)`, which provides a handle to the file without reading all content. - Read only the specific `ReadingOrder` item requested by `chapterIndex` on demand.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mjasin/Nexus.Reader#7