perf(ui): captures some low hanging fruit around excessive re-renders in the app#158
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (12)
📝 WalkthroughWalkthroughAdded Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
* develop: fix(entrypoint): ensure books directory exists and is writable by the target user (grimmory-tools#119) fix(metadata): fix metadata fetching relying for filename "first" instead of better fields like ISBN in Goodreads/Bookdrop (grimmory-tools#85) chore(build): migrate Gradle build scripts from Groovy to Kotlin DSL (grimmory-tools#100) perf(ui): captures some low hanging fruit around excessive re-renders in the app (grimmory-tools#158) fix(api): check legacy tools path for binaries (grimmory-tools#146)
… in the app (grimmory-tools#158) Co-authored-by: Zack Yancey <yanceyz@proton.me>
… in the app (grimmory-tools#158) Co-authored-by: Zack Yancey <yanceyz@proton.me>
… in the app (#158) Co-authored-by: Zack Yancey <yanceyz@proton.me>
… in the app (#158) Co-authored-by: Zack Yancey <yanceyz@proton.me>
Description
This cleans up some issues I noted in discord around there being a few small performance bugs I noticed when skimming the repo, I'll push the others up over the course of the week but they should all be pretty small like this PR
(AI Generated Description as follows)
Adds
ChangeDetectionStrategy.OnPushto 12 presentational components identified via Angular DevTools profiler as high-frequency change detection targets. All components were verified to have no unmanaged subscriptions, no internalBehaviorSubject/Subjectstate, and no mutations outside of@Input()or template-event paths — making them safe for OnPush withoutmarkForCheck()changes.Profiled on the current
developtip (post-TanStack migration) before and after to isolate the contribution of this change specifically.Profiler results (develop → this branch)
BookCardComponent's check count increasing while its cost drops is expected OnPush behavior — Angular visits the node to decide whether to check it, then skips the subtree when inputs are unchanged.Linked Issue: Fixes #157
Changes
What was intentionally excluded
BookBrowserComponent — internal BehaviorSubject state and ChangeDetectorRef injection; safe migration requires verifying all mutation paths first
AppMenuitemComponent — 4 unmanaged subscriptions; needs cleanup before OnPush
SeriesBrowserComponent — @ HostListener('window:resize') mutates template-bound computed properties
Reader components — deferred per contribution guidelines
Summary by CodeRabbit