Comments (13)
Yes, I've been eyeing these metrics and wanting to improve them for a while π .
I'm glad someone popped up and started plucking some great low-hanging fruit, thank you π .
I just spent some time refactoring things and have to get back to some features on the roadmap but I tend to pick these things up anyway along the way because they never get done otherwise. So both creating issues with great opportunities is helpful, as well as any PRs. I'll always make time to review those.
Ping me on Telegram https://t.me/smilingalex if you'd like my input on anything or I don't react to a PR!
from frontend.
Yea Lighthouse is great!
Well, I think that would depend on what you prioritize no? Downloading 30Mb of images is pretty terrible by any standard, don't get me wrong, but I think our audience is more interested in the time to first paint and interaction, and less interested in downloading a couple more megabytes. Nevertheless, I'm happy we improved it! Thanks for the help.
You'll also see Lighthouse mentions the same, reducing initial load with a smaller JS payload is nr3 on the list:
I vaguely recall the lib was also one of the bigger ones on the treemap in Lighthouse but not 100% sure now.
from frontend.
Another thing that came to mind, Lighthouse doesn't like our large DOM size. To some extent this is hard to overcome as the page is a dashboard and those tend to have a lot of nodes. However, we have a bunch of lists containing many items, which could wait with rendering those items. I think those might be the biggest DOM size savings available to us.
Then secondly we're exploring a design where each section lives in its page, that would help a lot.
from frontend.
Another idea: our SVGs are a mess. Looking at the network panel a lot of our requests are SVG, if we switch from:
<img href="/svg-icon.svg" />
To:
import svgIcon from "../assets/svgIcon.svg";
import Image from "next/image";
<Image href={svgIcon} />
Next will use clever caching techniques to skip the 304 check and majorly speed up the loading of the site, as about 50 requests can now be skipped.
If anyone wants to work on this, let me know, I'd propose we:
- move all SVG used by a single component into the associated component folder.
- all shared SVGs in a shared folder
src/assets
is fine for this, perhapssrc/assets/svg-icon
could be nice - re-export all SVGs at 100px (this won't matter for the size, but it does matter for how NextJS scales them by default! ping me and I'll take care of it, I'm happy to give access to our Figma file but SVGs are a mess there too)
The speed up from this on first and subsequent loads should be pretty big!
/cc @dawsbot our performance superhero π¦ΈββοΈ
from frontend.
@dawsbot no worries haha. Anything that isn't risky to merge, doesn't add tons of complexity for little gain, and improves performance is getting merged π π .
With the lazy loading, all I want to confirm is that we actually improve FCP / LCP / TTI before we merge anything that deviates from how Next would handle things by default, which seems pretty good.
I appreciate you'll try to keep it low-effort / low-stress for me to merge π .
(PRs are in btw)
from frontend.
GTmetrix-report-ultrasound.money-20220817T073535-DZIUoUWL.pdf
from frontend.
Thinking about other potential improvements, we use a library to copy the π¦π to clipboard, and its a very silly 50kb or so. We should try to find a piece of code we expect will work cross-browser / on phones, and use that instead.
from frontend.
Thinking about other potential improvements, we use a library to copy the π¦π to clipboard, and its a very silly 50kb or so. We should try to find a piece of code we expect will work cross-browser / on phones, and use that instead.
Although that feels like an easy win, 50k is not actually a big issue at the moment. There are higher priority payoffs to fix first like the 4MB images β I always try to do data-based improvements with tests like the GMetrix and lighthouse scores included above.
Thanks for being so responsive! π
from frontend.
We settled on a first pass for breaking up our dashboard page into sections. This should result in major performance improvements.
If anyone wants to work on it, just let me know!
from frontend.
Excited to see progress on this! Would you like me to implement the MVP for the lazy loading @alextes ?
from frontend.
@dawsbot yea, if you like, can you maybe do a proof-of-concept with whatever piece would benefit the most from lazy loading? But no hurry from my side, feel free to do it post-merge too. It'll actually be tough to find time for this before the merge π .
With a proof-of-concept in a branch we could also take a look and see how it impacts our timings in lighthouse π .
from frontend.
Don't get cold feet on me now @alextes ! π
I understand, I'll make a minimal example that's stress-free to merge. Something that really improves this loading, so that at merge, folks have a lightning-fast experience β‘οΈ
from frontend.
I'll wait until these get merged because of the diff it'll create: https://github.com/ultrasoundmoney/frontend/pulls
LMK @alextes
from frontend.
Related Issues (20)
- Eth Supply Projection - Dynamic default values for sliders HOT 1
- Burn Leaderboard - Some contracts missing twitter info HOT 1
- Burn Categories - Categories undistinguishable in gauge HOT 1
- Validator Rewards - Dynamically estimate MEV Share HOT 1
- Gas Streak - Broken Logic / Incorrect Values HOT 1
- Base Fees - Extend Datapoint-Tooltip HOT 1
- Supply Equilibrium - Revisit slider limits HOT 1
- Design - Inconsistencies in Fonts etc. HOT 1
- low-hanging visual tweak to the supply equilibrium
- issuance breakdown wrong ordering
- some Twitter images are not loading
- continuously update tab title prices
- Twitter pfps not loading in ERC20 leaderboard
- New Feature - Layer 2 Section / Widget
- New Feature - Blob Data Burn HOT 2
- New Feature - Flippening Widget HOT 1
- New Feature - "Eth the internet bond" HOT 2
- NFT Leaderboard wrong data HOT 1
- New Feature - Timeframe: 1 Year HOT 1
- the data is quite different from dune. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from frontend.