perf(courses): fix PDF OOM crashes and migrate from Syncfusion to pdfrx - #289
Conversation
…ed platform plugins
|
Claude finished @syed-tp's task in 4m 22s —— View job Claude PR ReviewTodo List
PR Review Summary✅ What's good
🔴 CRITICAL — Must fix before merge
🟡 WARNING — Should fix
🔵 SUGGESTION — Nice to have
VerdictCHANGES REQUESTED The migration direction and measured perf wins are compelling, but the missing PDF-load error handling (#1) combined with the removed controller disposal (#2) are worth resolving before merge — the first is a concrete UX regression (infinite spinner on any load failure), and the second potentially reintroduces the kind of native-memory leak this PR set out to fix. |
…, and scroll thumb accessibility
|
@claude review |
|
Claude finished @syed-tp's task in 3m 54s —— View job Claude PR ReviewTodo List
PR Review SummaryThis is a re-review of the current branch state, which now includes a second commit ( ✅ What's good
🟡 WARNING — Should fix
🔵 SUGGESTION — Nice to have
VerdictCHANGES REQUESTED (minor) — the two previous CRITICAL blockers are resolved; only the controller-disposal leak (#1) is worth fixing before merge, and the rest are confirmations/nice-to-haves. |
|
@claude review 1.
|
|
Claude finished @syed-tp's task in 1m 29s —— View job Claude PR ReviewTodo List
PR Review SummaryThanks for the detailed rebuttal — I re-checked each point against ✅ What's good
Responses to the 4 points
🔵 SUGGESTION — Nice to have (unchanged, non-blocking)
VerdictAPPROVED — all previously raised CRITICAL/WARNING items are resolved or satisfactorily explained. Only non-blocking suggestions remain. |
…d disabling loading delays
Background & Problem:
When loading and scrolling large or high-definition PDF documents (e.g. 100MB / 100 pages),
the app suffered from critical Out-Of-Memory (OOM) crashes and extreme latency with Syncfusion:
triggering fatal
E/DartVM: Exhausted heap spacecrashes around Page 9 as decompressedpage streams accumulated unbounded in the Dart VM heap.
before rendering Page 1, ignoring HTTP 206 Partial Content headers.
main UI isolate, blocking the thread for 17.22s and freezing user navigation.
Solution & Implementation:
workers to manage memory off the Dart VM heap.
page chunks on demand, rendering Page 1 in seconds.
limitRenderingCache: false to retain rendered page bitmaps and prevent white page flashes.
trailing pages asynchronously on native threads without starving the Flutter UI isolate.
overhead, eliminating heavy in-memory PDF binary rewriting.
($pageNumber / $pageCount).
Verified Metrics (100MB PDF Perfetto Profile):