Tuning for performance.

Post here if your message doesn't fit into another forum but is still about web development. Includes site critiques, web hosting and server questions, helpful software and resources, and more.
Post Reply
User avatar
RSteinwand
Rank VI - Professional
Rank VI - Professional
Posts: 592
Joined: Mon Jun 09, 2008 2:12 pm
Location: Fargo, ND
Contact:

Tuning for performance.

Post by RSteinwand » Tue Nov 14, 2017 8:37 am

Still obsessed with PageSpeed Insights, WebPagetest and GTmetrix scores, I've been tweaking. :?

The addition of a slider to my home page meant I had to load just one slide and build the rest via javascript after page load.
The addition of a YouTube video meant I had to postload it after page load.
I load critical css in the page head and the last couple days I've been trying different css loaders and keep coming back to Google's.
Today I didn't like how Analytics was loading early in the game and postloaded it for a gain of .2 seconds.

Is there a support group for this? :roll:
Rick

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3347
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Tuning for performance.

Post by Albert Wiersch » Tue Nov 14, 2017 9:32 am

LOL

Isn't that called OCD? :)

Just make sure the screen (viewport) doesn't jump around as it loads stuff. That is super-annoying and causes me to leave web sites especially on mobile devices. :D
Image
Albert Wiersch

User avatar
RSteinwand
Rank VI - Professional
Rank VI - Professional
Posts: 592
Joined: Mon Jun 09, 2008 2:12 pm
Location: Fargo, ND
Contact:

Re: Tuning for performance.

Post by RSteinwand » Tue Nov 14, 2017 9:57 am

Nope. No jumping. But I don't use Google Fonts (yet) either.

For mobile I don't load the slider, just the initial slide. If something's missing from the inlined css, it shows as blocking. Spent a lot of time on that. I think any home page that loads under 2 seconds isn't too bad since those are the ones with sliders and large graphics.
Rick

User avatar
RSteinwand
Rank VI - Professional
Rank VI - Professional
Posts: 592
Joined: Mon Jun 09, 2008 2:12 pm
Location: Fargo, ND
Contact:

Re: Tuning for performance.

Post by RSteinwand » Thu Nov 16, 2017 10:06 am

This article is interesting for those who haven't take the time to create image sprites and haven't (or can't) use http/2: http://www.ravelrumba.com/blog/data-uri ... questions/
Rick

User avatar
RSteinwand
Rank VI - Professional
Rank VI - Professional
Posts: 592
Joined: Mon Jun 09, 2008 2:12 pm
Location: Fargo, ND
Contact:

Re: Tuning for performance.

Post by RSteinwand » Wed Dec 06, 2017 8:54 am

I have critical css inlined on my public site, which means that the rest of my style sheet is loaded after page load. Inlining critical css means content on the page is visible sooner, often around .5 seconds or so, instead of having to wait for an external style sheet to load.

Although I had several similar scripts I tested, I used Google's recommendation for most pages, including their javascript: https://developers.google.com/speed/doc ... SSDelivery

Once LoadCss was suitable for my site I switched over and knocked about a half second off page load times (compared to the Google script) for most pages. https://github.com/filamentgroup/loadCSS

FWIW, Google links to the LoadCss page from their OptimizeCSSDelivery page.
Rick

User avatar
RSteinwand
Rank VI - Professional
Rank VI - Professional
Posts: 592
Joined: Mon Jun 09, 2008 2:12 pm
Location: Fargo, ND
Contact:

Re: Tuning for performance.

Post by RSteinwand » Tue Dec 19, 2017 7:38 am

I inlined a sprite image used only on our home page for ySlow score increase of one point and knocked .1 second off page load time.

https://www.site24x7.com/tools/image-to-datauri.html

Of course it was blocked by our Content Security Policy so had to add img-src data:

I'm running out of low-hanging fruit. :?
Rick

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3347
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Tuning for performance.

Post by Albert Wiersch » Tue Dec 19, 2017 9:43 am

Don't go too crazy now! :D
Image
Albert Wiersch

User avatar
RSteinwand
Rank VI - Professional
Rank VI - Professional
Posts: 592
Joined: Mon Jun 09, 2008 2:12 pm
Location: Fargo, ND
Contact:

Re: Tuning for performance.

Post by RSteinwand » Tue Dec 19, 2017 9:51 am

Too late for that. :mrgreen:
Rick

Post Reply