-
Notifications
You must be signed in to change notification settings - Fork 44
[Dashboard] - Performance Check #3442
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
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
4 Skipped Deployments
|
dnechay
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.
Amazing work!
Next improvement would be to update mui to latest version ;)
My only concern is direct import from @human-protocol/sdk/src/... of sdk, which implies knowledge about package internals. I understand that there is no option to do it in another way atm, but maybe we can prepare a separate PR for SDK where we improve that (as well as exporting some other useful types from there, such as EscrowData), wdyt @portuu3 @flopez7?
packages/apps/dashboard/client/src/app/providers/ThemeProvider.tsx
Outdated
Show resolved
Hide resolved
All this data is already exported in SDK, we can directly do |
|
@flopez i need to specify full path to file (e.g |
What would be the changes to apply to fix this? @KirillKirill |
|
@portuu3 i might be mistaken, but we need to change sdk's index file somehow, because if i import a constant, it pulls everything from the sdk (i.e types, enums, clients, utils) this is a good modern practice, but still if i would accidentally import from the index file, it would pull everything from it. |
… preload fonts; add terser minification; reduce layout shift on home page
27ecfaf to
fad7ba0
Compare
Issue tracking
Not ticketed
Context behind the change
This PR aimed to boost a performance of the Dashboard App. That was mostly achieved by tree shaking of our sdk module (that got us the biggest perf bump) and mui icons, and minifying the main bundle via vite and its options.
The screenshots below show, how a performance got bumped on the heaviest pages (Home and Search Results) and how was decreased the main bundle and time to build the app.
Also I eliminated a layout shift on pages and added aria labels to some buttons in order to improve the accessibility score
Screenshots
x5 less modules to transform, x2.5 less size of the main bundle, 1.5 seconds less to build the project
+15 perf points and +10 a11y points
1 second less to paint the first elements, no layout shift
How has this been tested?
running
yarn build, thenyarn preview, then run Lighthouse in ChromeRelease plan
regular
Potential risks; What to monitor; Rollback plan
no risks i guess