Repository navigation
perf: Enhance Vite config for React compiler options in plugins ⚡ - #60
Merged
Merged
Conversation
sanjaiyan-dev
marked this pull request as ready for review
November 6, 2026 16:31
Contributor
Author
|
Hi @maneesha-xyz , Quick update: I made a few minor, non-breaking tweaks to align our code with React Compiler standards. Testing on long email threads showed an unexpected improvement—typing a reply used to cause heavy re-renders across all messages in the thread, but those are now completely gone. Meta is already adopting this in production, and I personally feel rolling out the React Compiler will give us a huge real-world performance lift. No rush at all, please take your time to review whenever you're free. Thanks! Screen.Recording.2026-11-08.at.20.11.06.movScreen.Recording.2026-11-08.at.20.12.32.mov |
sanjaiyan-dev
force-pushed
the
react-compiler
branch
from
November 11, 2026 19:44
a72e383 to
3570c53
Compare
Contributor
Author
|
Hi @maneesha-xyz , I've resolved the merge conflicts. |
maneesha-xyz
self-requested a review
November 12, 2026 05:19
This was referenced Nov 16, 2026
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.
📌 Summary & Strategic Intent
This PR validates the production rollout of the React Compiler across
<MailPage>.Rather than relying on error-prone manual memoization (
useMemo,useCallback,React.memo), the compiler statically analyzes control flow and generates fine-grained cache slots (_c()) at build time.As confirmed via React DevTools Profiler (indicated by the active
Memo ✨badge), this yields a -70.3% drop in total main-thread CPU render time, completely eliminates Long Tasks (>50ms), and provides immediate downstream defense for Interaction to Next Paint (INP).📊 Master Benchmark: Baseline vs. React Compiler (
Memo ✨)Memo ✨)490.90 ms145.80 ms-345.10 ms3.70 s2.80 s-0.90 s1715-2 passes15.70 ms5.10 ms-10.60 ms28.88 ms9.72 ms-19.16 ms8.30 ms2.50 ms-5.80 ms88.70 ms37.40 ms-51.30 ms~72.40 ms25.50 ms-46.90 ms88.70 ms37.40 ms-51.30 ms626.53 ms²99.42 ms²-527.11 ms²24.28 ms9.63 ms-14.65 ms38.00 ms9.70 ms-28.30 ms4 (23.5%)0 (0.0%)-4 tasks72.90 ms0.00 ms-72.90 ms8 / 17 (47.1%)3 / 15 (20.0%)-5 frames1 / 17 (5.9%)11 / 15 (73.3%)+10 framesN/A0 LOC0 linesEnabling the React Compiler cut our render time by 70% (491ms down to 146ms) and made page interactions 3x faster (16ms down to 5ms)—without us having to write a single line of extra code. It also completely wiped out UI freezes over 50ms. This keeps the app running smoothly on slower phones, stops users from leaving out of frustration, and protects our Google search rankings (INP score).
References