Skip to content
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

Run a series of performance tests to gather data on SVG rendering and add the result to the documentation #10

Open
technopagan opened this issue Sep 21, 2017 · 6 comments

Comments

@technopagan
Copy link
Collaborator

SVG will very likely take a little longer to render than a base64-encoded raster image. And the Gaussian Blur applied to the simple SVG shapes created by Primitive is probably quite CPU intensive.

Let's run a series of performance tests, ideally on WPT, to compare LQIP raster image rendering performance vs. SQIP rendering performance and also compare CPU utilization.

@axe312ger
Copy link
Owner

@ChrisRobston
Copy link

I have a page where I have a lot of images and SQIP for them. I noticed that page have issues with rendering, especially when I fast scroll it, and especially on mobile. This is caused by this SVG and blur effects that is really CPU intensive.

Is there any workaround? This SQIP technique is so beautiful and I don't want to throw it out because of that glitches. Right now I am using SQIP as an url() for background-image. May be I should use base64 or just insert plain SVG? Will it make difference?

@axe312ger
Copy link
Owner

You can use css blur but this will round your corners. You may use a wrapping div, set it to overflow: hidden and zoom your sqip by 10% with translate: scale(1.1)

A little bit more ugly but is more performant.

@ChrisRobston
Copy link

ChrisRobston commented Jul 19, 2018

@axe312ger thanks for tips! For now I decided to detect mobile and not show SQIP for them at all. Mobile layout should be simpler anyway.

One more question, if you please. What about resolution? Does it have any impact in case of SVG? I'm little confused, since 100x100 and 2000x2000 images have same filesize. What about rendering? Dimensions have any impact? (my current SQIP's are pretty big, but I scale them down with CSS since parent element is much smaller, not sure how it performs)

@axe312ger
Copy link
Owner

Feel free to play with the code in https://github.com/axe312ger/embedded-svg-loading-impact-research.

Maybe create a set of pages using SQIP with blur having 4,6,8,10,15,20,40,60,80 pictures and see how it impacts mobile loading time with mobile devices. Measurements can be done with http://webpagetest.org/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants