ReadViewSDK/Sources/RDReaderView/EPUBUI/ReaderController/ChapterRuntime
shen d20196ee34 feat: configurable chapter window & parallel metadata parsing with benchmark
1. Configurable chapter window size (onDemandChapterWindowSize: 3-15)
   - Parameterized window radius in RDEPUBChapterRuntimeStore
   - Updated RDEPUBChapterWindowCoordinator to use configurable radius
   - RDEPUBChapterWindowSnapshot.from() accepts chapter array instead of fixed prev/next
   - Even numbers round up to odd (4→5), min 3, max 15

2. Configurable metadata parsing concurrency (metadataParsingConcurrency)
   - Default equals CPU core count
   - Parallel execution via OperationQueue in paginateMetadataOnly
   - Each worker creates independent builder instance
   - NSLock protects result aggregation

3. Per-chapter and total wall-clock timing instrumentation
   - Separated render vs I/O timing per chapter
   - Summary log with wallClockMs, renderTotalMs, writeTotalMs, avgRenderMs
   - Timing stored in RDEPUBReaderContext for test access

4. UI automation test infrastructure
   - Added --demo-window-size, --demo-concurrency, --demo-clear-cache launch args
   - DemoReaderState exposes windowSize, parseMs, parseConcurrency
   - ConfigurableWindowTests: 5 test cases for window size 3/5/15
   - ConcurrentParsingTests: 4 test cases for concurrency 2/4
   - MetadataParseBenchmarkTests: serial vs parallel benchmark

5. Bug fixes
   - Fixed page snap-back during background parsing (isUserInteracting check)
   - Reduced BookPageMap refresh frequency from 16 to 32 chapters
   - Moved waitForReadingInteractionToSettle outside operation loop

6. Design doc: dual-layer PageMap (estimated + precise mixed)
2026-06-03 23:38:11 +08:00
..
RDEPUBBackgroundTrace.swift feat: complete large-book pagination runtime and UI coverage 2026-06-03 17:47:16 +08:00
RDEPUBBookPageMap.swift feat: complete large-book pagination runtime and UI coverage 2026-06-03 17:47:16 +08:00
RDEPUBChapterCacheKey.swift feat: complete large-book pagination runtime and UI coverage 2026-06-03 17:47:16 +08:00
RDEPUBChapterDataCache.swift feat: complete large-book pagination runtime and UI coverage 2026-06-03 17:47:16 +08:00
RDEPUBChapterLoader.swift feat: complete large-book pagination runtime and UI coverage 2026-06-03 17:47:16 +08:00
RDEPUBChapterLocation.swift feat: complete large-book pagination runtime and UI coverage 2026-06-03 17:47:16 +08:00
RDEPUBChapterOffsetMap.swift feat: complete large-book pagination runtime and UI coverage 2026-06-03 17:47:16 +08:00
RDEPUBChapterRuntimeStore.swift feat: configurable chapter window & parallel metadata parsing with benchmark 2026-06-03 23:38:11 +08:00
RDEPUBChapterSummaryDiskCache.swift feat: configurable chapter window & parallel metadata parsing with benchmark 2026-06-03 23:38:11 +08:00
RDEPUBChapterWindowCoordinator.swift feat: configurable chapter window & parallel metadata parsing with benchmark 2026-06-03 23:38:11 +08:00
RDEPUBChapterWindowSnapshot.swift feat: configurable chapter window & parallel metadata parsing with benchmark 2026-06-03 23:38:11 +08:00
RDEPUBLocationConverter.swift feat: complete large-book pagination runtime and UI coverage 2026-06-03 17:47:16 +08:00
RDEPUBPageCountCache.swift feat: complete large-book pagination runtime and UI coverage 2026-06-03 17:47:16 +08:00
RDEPUBPageResolver.swift feat: complete large-book pagination runtime and UI coverage 2026-06-03 17:47:16 +08:00
RDEPUBRuntimeChapter.swift feat: complete large-book pagination runtime and UI coverage 2026-06-03 17:47:16 +08:00
RDEPUBRuntimePageCount.swift feat: complete large-book pagination runtime and UI coverage 2026-06-03 17:47:16 +08:00
String+SHA256.swift feat: complete large-book pagination runtime and UI coverage 2026-06-03 17:47:16 +08:00