perf: Analytics Phase 6 — Optimization & Cleanup (107MB RAM saved) - #31
Closed
ChitkulLakshya wants to merge 3 commits into
Closed
perf: Analytics Phase 6 — Optimization & Cleanup (107MB RAM saved)#31ChitkulLakshya wants to merge 3 commits into
ChitkulLakshya wants to merge 3 commits into
Conversation
… endpoint RAM optimizations for 512MB Render plan: - emailService.js: lazy-load googleapis via getOAuth2Client() instead of top-level require. Saves ~55MB heap at startup (googleapis 62MB → 0MB until first email send) - index.js: remove dead User model (firebaseUid) from both account deletion endpoints. User model was leftover from Firebase migration (PR #12), departments now stored in Supabase profiles table - index.js: add GET /api/health endpoint returning RSS, heap, external memory + uptime for Render monitoring
- Move AnalyticsPage from static import to lazy() import - Creates separate chunk: AnalyticsPage-*.js (21.7KB) - Reduces main bundle by ~23KB (5,950KB → 5,927KB) - Analytics page only loads when user navigates to it
✅ Deploy Preview for leddger-ai ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Collaborator
Author
|
Closing as stale — this branch is significantly behind main and merging it would revert 6000+ lines of merged work including Google Drive integration, connection maps, RAM optimizations, OTP verification, and multiple bug fixes. Please rebase on latest main if you need any of these changes. |
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 free
to 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.
Analytics Phase 6 — Optimization & Cleanup
Optimizes server for Render 512MB plan. Reduces startup RAM by 107MB (49%).
Memory Impact
Changes
Build
Docs