#TIL: Why's my site so damn slow

I've been wanting to learn and read up on site performance and optimization for awhile. Finally got a chance to. So today I learned ... 

  • I really like learning about performance stuff. What makes the site slow, fast, etc. I think it’s because there are actual metrics involved, something I can point to and say, “Well that sucks. And it sucks by 7.8 seconds.”
  • what Eager Loading and N+1 queries are. And they make sense! These sources really helped --> http://build.thoughtbot.com/performance/, http://www.slideshare.net/MattKuklinski1/boosting-the-performance-of-your-rails-apps, 
  • Our site is slow. I knew this before, and assumed it was because we were making inefficient queries to our database, but it turns out, it’s not the app stuff, it’s the images/css/js stuff. I used PageSpeed Insight to analyze our site, and it gave us a very pathetic 35/100 on desktop, 30/100 on mobile. BUT, it was also helpful and gave suggestions on compressing images and stuff which led to ...
  • looking more into vector vs. rastor, and actually opening up and playing with our images to see what made a difference in file size and by how much.
  • found commons.wikimedia for logos in svg and in different size in png and it is awesome
  • apparently caching in rails is actually as easy as everyone said it was. I don’t know why I didn’t believe them --> http://www.codelearn.org/blog/rails-cache-with-examples
  • slides for talks on topics that are new to me are actually a great starting point. Even without the speaker there to walk through the points, looking at the screenshots, code snippets, and even just having the terminology to look up and dig into was awesome, and super helpful
  • I knew about asynchronous javascript, but didn't really think much about (or really heard much about) the opposite, which is apparently called parser blocking javascript. Great article on the topic and how it can affect your site's performance
  • feels good to finally dive into New Relic