-
Notifications
You must be signed in to change notification settings - Fork 33
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
/bg.svg murders performance #1039
Comments
if this is actually an issue, consider webp? pretty sure thats the fastest image format on web browsers |
png, webp, avif, jpg, whatever. they're all better than a svg with a gazillion |
if anyone would like to try a webp, i converted the bg.svg, download is here: https://www.mediafire.com/file/zsjjaqp2i3uayye/bg.webp/file sorry about mediafire link, github doesnt allow webp uploads |
Alright, I don't think that it is going to solve the things completely as bg.svg is not the only issue but other things and packages that we are using along with it like framer motion, multiple number of svgs / pngs etc and this uses a lot of memory along with various other things. While I have also noticed this problem I am going to try it first in the local environment and if that works I will make a pr to change bg.svg with bg.png if that's what you like to get added. |
i did go into devtools and override /bg.svg with a blank svg file and i did notice a performance increase |
Screencast_20241225_110400.mp4 |
Well I also noticed it when I removed the bg.svg file but I think the overall issue is because that we are using an image as a background. Using bg.png instead of bg.svg will not increase the performance by a lot of percentages as most of the things will stay same. The blank svg did it because there are no clip paths in the file (as svg files are rendered with the help of browsers and are hard to open in gallery. Please let me know any other alternative you think of ` |
Can someone submit a PR that swaps out the SVG with a WEBP & png fallback? |
Sure, on it! |
I'm reopening this because it didn't add webp! I like that the PNG there though |
Sure, I will also update with a webP |
Decided to add it to my project and the video speaks for itself. This explains why the site is laggy as hell on mobile. Solution: Just use a PNG.
Screencast_20241224_203503.mp4
By the way, the video is 30fps, not 5.
The text was updated successfully, but these errors were encountered: