Tweets-Plus-One-Chrome-Extension icon indicating copy to clipboard operation
Tweets-Plus-One-Chrome-Extension copied to clipboard

With Tweet +1 on Twitter, it freezes once in a while...

Open deantobias opened this issue 14 years ago • 4 comments

I wonder why it freezes so often... on twitter.com with that extension? Hmm... I use Chrome 12 now.

deantobias avatar Jun 10 '11 17:06 deantobias

It takes just a moment to turn on all those +1 iframes. I believe this is the source of the freezes.

sethladd avatar Jun 11 '11 03:06 sethladd

If one scrolls down by a couple of screens quickly (admittedly, on a 512kbps downstream connection), Twitter freezes completely — most likely because of all the iframes. Google may even be throttling so many simultaneous requests...

How about, instead of loading the iframes immediately and only displaying them on hover, you defer the load until the hover? I bet the latency would be acceptable — and it would be much less of a slam against the browser and Google.

ipopov avatar Jun 16 '11 00:06 ipopov

Great idea, definitely worth a shot!

sethladd avatar Jun 16 '11 02:06 sethladd

So, this represents both my first attempt at Javascript and at Github, but this does something like what I suggested: https://github.com/ipopov/Tweets-Plus-One-Chrome-Extension/commit/e8be49a196d88786b383fb485cf974b67c56cb32

This no longer freezes Chrome but, unfortunately, the latency is very noticeable on this version. Perhaps someone else can shape up this commit. :-)

ipopov avatar Jun 16 '11 02:06 ipopov