john-science / john-science.github.io

A Blog of Minor Obsessions
http://john-science.github.io/
Apache License 2.0
3 stars 3 forks source link

How performant is my GitHub Pages blog? #59

Closed john-science closed 6 years ago

john-science commented 7 years ago

Run a performance test using various browsers and from different locations:

https://www.webpagetest.org/result/170208_X8_RGSD/

Consider:

1) Did I remove all of the unnecessary JavaScript and CSS from my site? 2) How lightweight is this pre-rendered Jekyll platform? 3) Do some of my pages have too many images? 4) What can I do to help my pages that are image-heavy load faster and better? For instance, visual placeholders that are in the right place, but are empty, allowing people to read while the image loads. 5) Should I be minifying my custom JavaScript? 6) Is the Jekyll JavaScript served up by default minified?

Read up on the general theory on modern "High Performance Browser Networking":

https://hpbn.co/

If I can improve my load times enough, it might be worth posting how I did it.

john-science commented 7 years ago

Minimized CSS using: https://css.github.io/csso/csso.html

NOTE: None of these CSS minimizers contract different keywords that have the same attributes. There is room for a better tool here.

john-science commented 7 years ago

The easiest solution for minifying my JS is to use the webapp version of the Closure Compiler:

http://closure-compiler.appspot.com/home

john-science commented 7 years ago

Google's webapp PageSpeed has the best starting guide to improving your website's performance (and other things).

https://developers.google.com/speed/pagespeed/insights/?url=http%3A%2F%2Fantineutrino.net%2F2017%2F01%2F10%2Feww-javascript-part-2&tab=desktop

john-science commented 7 years ago

When build locally for testing: jekyll server is the command

john-science commented 7 years ago

I guess I should break the CSS into functional groups. Fewer files would also mean fewer requests to the server.

The goal is to break out the sections of CSS out that are actually needed above-the-fold. And divide the rest into sections based on media queries:

https://developers.google.com/web/fundamentals/performance/critical-rendering-path/render-blocking-css

john-science commented 7 years ago

To isolate above-the-fold CSS, check out this helpful blog post, which references this snippet of JavaScript, which should do that heavy-lifting. You will need this snippet, to get the JS function getMatchedCSSRules to run in Firefox.

For the final CSS compression, look here.

john-science commented 7 years ago

Existing CSS to Clean Up

Existing CSS to Remove

Existing CSS to Research, with the hope of simplifying

john-science commented 7 years ago

Move IE CSS to it's own file... or delete it. Use HTML conditional import.

john-science commented 7 years ago

Change name syntaxhighlighter.css to after-the-jump.css. Move master pre definition from style.css over to it. And... what else?

john-science commented 7 years ago

The previous above/below-the-fold CSS changes finally got me Two Green Checks on Google PageSpeed!

Does Disqus affect my ratings on PageSpeed?

john-science commented 7 years ago

Articles on improving page speeds and PageSpeed rankings:

john-science commented 7 years ago

I didn't get to see how removing Disqus comments affected my performance, because I was only running PageSpeed against the home page, not a post. Darn.

john-science commented 6 years ago

Okay, I have some good, rough outlines to test my blog's performance in the future. No reason to leave this ticket open forever.