My custom S1 style (created long before the dawn of S2) uses external stylesheets of my own magic. 7 of them to be exact. Since the introduction of CSS-Cleaner, the pages load noticably slower, even when refreshed immediately (so that the styles should be coming from the hot cache at LJ). My pages used to load in 1 second, but now I'm lucky to get them in 3 seconds.
I'll make a second post with the other thing (more major) item that CSS-Cleaner has broken with my stylesheets.Testcase #1:
- I set up FasterFox with the default Firefox settings, but it's display timer enabled, so I could see load times.
- Load my page http://robbat2.livejournal.com/calendar multiples time, determine average - 2.8 seconds over 15 runs.
- Edit the style to leave out all stylesheet <link> tags except one.
- Repeat #2, time is now 1.2 seconds over 15 runs.
- Notice a 1.6 second difference between the setups.
- Remember to set the style back the way it was originally.
- Load http://robbat2.livejournal.com/calendar, save a local copy to /tmp/calender.remote.html
- Produce a copy that goes direct instead of using CSS-Cleaner:
sed -e 's,http://cssproxy.livejournal.com/?u=,,g' </tmp/calender.remote.html >/tmp/calender.local.html
- Load file:///tmp/calender.remote.html 15 times, average is 1.9 seconds.
- Load file:///tmp/calender.local.html 15 times, average is 0.5 seconds.
- Notice the difference is 1.4 seconds between the setups.
I think the correlation between the 1.6 and 1.4 seconds is too much of a co-incidence. CSS-Cleaner is badly slowing down my pages. If we assume 1.5 seconds is the slowdown caused by CSS-Cleaner, and that my pages used to load in 1 second (tolerance of 0.1 seconds), then we can say that CSS-Cleaner is inducing a slowdown of 150% - taking 2.5 seconds instead of 1 second.
I checked in my access_log to see if the 5 minute caching alluded to a previous post was correct, and it does seem to be reasonable true, to within 10 seconds of the 5 minute mark.
I haven't looked at the CSS-Cleaner codebase as of yet, but I'm wondering if anybody here has suggestions on the slowdown, other than reducing the number of stylesheets I use, which isn't really an option (see my next post).