PDA

View Full Version : [SITE] Performance suggestions (gzip, image caching and scaling)



GreenReaper
10-01-2012, 01:57 PM
Attention should be paid to the Page Speed performance guidelines (https://developers.google.com/speed/pagespeed/insights#url=https_3A_2F_2Fwww.weasyl.com), particularly the compression of HTML/CSS/JS, the serving of scaled images, and the use of caching directives. There are various other issues (http://en.wikifur.com/wiki/User:GreenReaper/CutTheFluff) which may apply, but those are the ones that should be worked on soon. Compression in particular will be a big win and should be easy to enable.

Taw
10-02-2012, 03:54 AM
I'm not sure what the current situation regarding this fixes are on the main site (As I'm not one who works on those things!), but I have linked them to this thread to read over when they can. Thanks for the suggestion!

GreenReaper
02-14-2013, 09:21 PM
Hey! Just to refresh - compression appears to have been enabled for the HTML itself, but not for JS and CSS resources (https://developers.google.com/speed/pagespeed/insights#url=https_3A_2F_2Fwww.weasyl.com&mobile=false&rule=EnableGzipCompression), which would be especially useful for all the new users.

Usually you set this up in your web server configuration (http://www.g-loaded.eu/2008/05/10/use-mod_deflate-to-compress-web-content-delivered-by-apache/) (e.g. httpd.conf). You can also add long-term Expires: or Cache-Control: headers on such resources, as long as you version them in the HTML by putting something like ?12345678 [ e.g. timestamp ] at the end of the URL, and increment it whenever you make a change. That way people only have to get it once!

weykent
02-14-2013, 10:15 PM
hi! thanks for your instructions, but we're not using apache at all, and we're generally familiar with how HTTP works. the new technical team has been far more busy with important backend and infrastructure work than than with worrying how the static files are served.

it'll get done eventually, but there's still more important work that's taking precedence.

GreenReaper
02-15-2013, 06:20 AM
Well, since you're using nginx it'd be just a few lines too - something like:

gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_types text/plain application/xml text/css text/js text/xml application/x-javascript text/javascript application/json application/xml+rss;
in nginx.conf

This isn't something that should take the team more than five minutes. The module details are here (http://wiki.nginx.org/HttpGzipModule).

weykent
02-15-2013, 06:34 AM
hi! thanks for your interest, but the technical team isn't accepting applications at the moment.

GreenReaper
02-15-2013, 07:04 AM
Hah! I already have plenty on my plate handling WikiFur and Flayrah. (Besides, as an IB mod, it'd probably be a conflict of interest. :-)

All I'm saying is, give those a go. It's one of the few not-so-hard things that can make a big difference to a user's first impression of a site, especially those on mobile or other lower bandwidth connections.

WebPageTest took two seconds to get public.css (http://www.webpagetest.org/result/130215_WV_BJJ/1/details/). Frankly, I think that's a worst case - it was more like 0.3-0.4 seconds here - but every little helps.

catalepsy
02-15-2013, 01:35 PM
As already mentioned, we are currently focused on backend code bottlenecks (the app does a lot more work than it needs to), and less on HTTP performance. Thanks for the advice.

seinkraft
02-17-2013, 12:42 PM
Agree with reaper.

The enable of the compression takes only a few seconds to make and will be a big improvement on the loaf of the frontend.

catalepsy
02-17-2013, 03:07 PM
As already mentioned, we are currently focused on backend code bottlenecks (the app does a lot more work than it needs to), and less on HTTP performance. Thanks for the advice.
.