Make Chrome run 4 times faster

Tags: websites, software.
By lucb1e on 2012-09-09 20:54:19 +0100

(TL;DR)
I almost filed a support request at Grooveshark for making the site incredibly slow. It's never been fast, but the until very recently I could live with it. Now it took around 70 seconds from the moment the page started loading until I heard sound come out of my speakers.
Also selecting a song in the list (not playing it or anything, just selecting) took a few seconds. Absurd.

Just before I opened the feedback form, I got the smart idea to attach a timeline from Chrome's developer tools. Looking through the timeline's data dump for any private information it might contain, I noticed extension URLs being loaded and wondered if they had anything to do with it.

So being a typical lazy programmer, instead of checking all extensions individually when you're not even sure if that's the problem, I opened an incognito window. Only one extension is allowed to run there (the Facebook blocker to keep them from tracking me), so that should be okay.

And yes! ~18 seconds versus 70 before. Let me do the math for you:
70 / 18 = 3.9 times faster.

So who was guilty? Well Adblock Plus has a huge blocklist, surely that must be a performance impact. Disabling that and retrying, it was still 70 seconds.

Okay... Maybe the Alexa toolbar, I installed that recently. Must be it!
Nope.

So I started trying all other extensions... but eventually, almost falling asleep out of boredom and waiting, none of them caused the problem.

Well damn! Then it must be all of them!
So I disable all extensions. And I retry. And still, it takes over a minute.
Huh? Yeah.

Then I remembered something.

I had a problem with Google yesterday: When using search, the tab key didn't automatically focus the first result anymore. It used to work, it works on other computers with the same Google account, and it works in incognito mode: it had to be a cookie (or localStorage).

So deleting my Google cookies yesterday (which solved the problem), I was surprised by the huge list of cookies all sites combined store. I already wondered about the performance impact yesterday, but not really noticing anything, I guessed that it was okay. Also I didn't want to login everywhere again; it is neat to visit a website 3 years later and still be logged in.

(TL;DR starts here)
Remembering this huge cookies list, and remembering that the only difference left between normal and incognito mode were these cookies, that must be it.
I went to the settings, then advanced settings, then "Remove Browsing Data". In the dialog that appeared, I ticked the boxes to remove all cookies and cache, then hit the erase button.
(Direct link to the dialog: chrome://chrome/settings/clearBrowserData).

Then I enabled my extensions again and re-ran the test.

18 seconds versus 70 originally, and that's with all my extensions loaded! Yay!

The only weird thing is that I've only been using Chrome for about 6 months, and even when Firefox contained browser history from 3 years it was no problem. Also the slowness only became noticable very recently. I tried using an older version of Chrome, it keeps the previous version installed, but both were 21.0.1180.x. Using the older one made no difference at all.

Anyway, mystery solved: erasing your cookies has a pretty big performance impact on low- to mid-end systems :)

PS. The "direct link" is not clickable because Chrome does not allow clicking chrome:// links for some reason. Just disable CSRF and it's perfectly safe I'd say, but Chrome is being Chrome; excessive security hardening at the expense of flexibility.
lucb1e.com
Another post tagged 'websites': CSRF: It's not trivial

Look for more posts tagged software or websites.

Previous post - Next post