-
Notifications
You must be signed in to change notification settings - Fork 5.5k
fix: optimize unlock performance cp-13.0.0 #34436
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
| } | ||
|
|
||
| componentDidMount() { | ||
| async componentDidMount() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we change this to async, do we need to change all calls to this function to using await?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @matthiasgeihs, we don't need to. componentDidMount is a react lifecyle method (https://react.dev/reference/react/Component#componentdidmount) which will be run when the component is mounted.
Regardless of using async or not, does not matter here (since the function returns void and react doesn't do anything with it).
I just add async to componentDidMount so that we can know if the passwordOutdatedCheck is failed. 4caa0fb#diff-f6f23f7c3cf523f0e66d1892bfd99b9179bae4978e855c4b6e683d5d0b21981dR128-R132
Builds ready [4caa0fb]
UI Startup Metrics (1260 ± 62 ms)
Benchmark value 1083 exceeds gate value 1070 for chrome browserify home mean load Benchmark value 1075 exceeds gate value 1061 for chrome browserify home mean domContentLoaded Benchmark value 210 exceeds gate value 10 for chrome browserify home mean backgroundConnect Benchmark value 4 exceeds gate value 1 for chrome browserify home mean initialActions Benchmark value 873 exceeds gate value 830 for chrome browserify home mean loadScripts Benchmark value 1371 exceeds gate value 1365 for chrome browserify home p95 uiStartup Benchmark value 43 exceeds gate value 41 for chrome browserify home p95 domInteractive Benchmark value 223 exceeds gate value 18 for chrome browserify home p95 backgroundConnect Benchmark value 16 exceeds gate value 1.2 for chrome browserify home p95 initialActions Benchmark value 971 exceeds gate value 940 for chrome browserify home p95 loadScripts Benchmark value 2379 exceeds gate value 2192 for chrome webpack home mean uiStartup Benchmark value 1877 exceeds gate value 1711 for chrome webpack home mean load Benchmark value 1865 exceeds gate value 1704 for chrome webpack home mean domContentLoaded Benchmark value 54 exceeds gate value 40 for chrome webpack home mean backgroundConnect Benchmark value 1858 exceeds gate value 1699 for chrome webpack home mean loadScripts Benchmark value 2633 exceeds gate value 2454 for chrome webpack home p95 uiStartup Benchmark value 2189 exceeds gate value 2030 for chrome webpack home p95 load Benchmark value 2183 exceeds gate value 2005 for chrome webpack home p95 domContentLoaded Benchmark value 65 exceeds gate value 57 for chrome webpack home p95 domInteractive Benchmark value 278 exceeds gate value 90 for chrome webpack home p95 backgroundConnect Benchmark value 13 exceeds gate value 7 for chrome webpack home p95 initialActions Benchmark value 2173 exceeds gate value 1970 for chrome webpack home p95 loadScripts Benchmark value 1507 exceeds gate value 1405 for firefox browserify home mean uiStartup Benchmark value 1291 exceeds gate value 1245 for firefox browserify home mean load Benchmark value 1291 exceeds gate value 1239 for firefox browserify home mean domContentLoaded Benchmark value 114 exceeds gate value 110 for firefox browserify home mean domInteractive Benchmark value 30 exceeds gate value 25 for firefox browserify home mean backgroundConnect Benchmark value 29 exceeds gate value 25 for firefox browserify home mean firstReactRender Benchmark value 12 exceeds gate value 11 for firefox browserify home mean getState Benchmark value 8 exceeds gate value 1 for firefox browserify home mean initialActions Benchmark value 1267 exceeds gate value 1230 for firefox browserify home mean loadScripts Benchmark value 15 exceeds gate value 9 for firefox browserify home mean setupStore Benchmark value 1866 exceeds gate value 1660 for firefox browserify home p95 uiStartup Benchmark value 293 exceeds gate value 195 for firefox browserify home p95 domInteractive Benchmark value 57 exceeds gate value 55 for firefox browserify home p95 firstReactRender Benchmark value 32 exceeds gate value 24 for firefox browserify home p95 getState Benchmark value 13 exceeds gate value 2 for firefox browserify home p95 initialActions Benchmark value 52 exceeds gate value 27 for firefox browserify home p95 setupStore Benchmark value 1763 exceeds gate value 1615 for firefox webpack home mean uiStartup Benchmark value 1490 exceeds gate value 1380 for firefox webpack home mean load Benchmark value 1490 exceeds gate value 1380 for firefox webpack home mean domContentLoaded Benchmark value 30 exceeds gate value 26 for firefox webpack home mean backgroundConnect Benchmark value 52 exceeds gate value 38 for firefox webpack home mean firstReactRender Benchmark value 8 exceeds gate value 1 for firefox webpack home mean initialActions Benchmark value 1465 exceeds gate value 1360 for firefox webpack home mean loadScripts Benchmark value 22 exceeds gate value 13 for firefox webpack home mean setupStore Benchmark value 2087 exceeds gate value 1935 for firefox webpack home p95 uiStartup Benchmark value 1737 exceeds gate value 1660 for firefox webpack home p95 load Benchmark value 1737 exceeds gate value 1660 for firefox webpack home p95 domContentLoaded Benchmark value 250 exceeds gate value 156 for firefox webpack home p95 domInteractive Benchmark value 52 exceeds gate value 49 for firefox webpack home p95 backgroundConnect Benchmark value 63 exceeds gate value 50 for firefox webpack home p95 firstReactRender Benchmark value 34 exceeds gate value 32 for firefox webpack home p95 getState Benchmark value 25 exceeds gate value 2 for firefox webpack home p95 initialActions Benchmark value 1704 exceeds gate value 1630 for firefox webpack home p95 loadScripts Benchmark value 211 exceeds gate value 28 for firefox webpack home p95 setupStore Sum of mean exceeds: 1757ms | Sum of p95 exceeds: 2227.8ms Sum of all benchmark exceeds: 3984.8ms Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
himanshuchawla009
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Description
This PR includes changes which updates the
Password Syncchecks and optimizes theWallet Unlockoperation for the Social Login flow by ~checkIsPasswordOutdatedunlock page loadcheckIsPasswordOutdatedfrom cachecheckIsPasswordOutdatedupon locking the wallet.Changelog
CHANGELOG entry:
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist