Live data from Hacker News

A single tweet page is 2.0 MB

mike.teczno.com

51–60 of 115 posts

Re: A single tweet page is 2.0 MB

#51
post #50
post #38

Earlier quoted context omitted.

More and more users are on mobile devices, sure. But those load up the mobile version of the Twitter site, which is very lean.

Not when they are clicking on a link in email or other page. EDIT: misread your comment. Thought you were talking about mobile apps. Also, I would not call their mobile site 'very lean'. Just got a single twit page on iPhone: 817Kb.

Really? Because when I go to a Twitter link on my phone it redirects me to the mobile site, irrespective of the original domain.

Re: A single tweet page is 2.0 MB

#52
post #3

His rant doesn't seem too informed: "aggressive anti-performance and apparent contempt for the web by Twitter’s designers" According to his charts most of Twitter's page is JS/CSS and presumably set to heavily cache. Very little is data. Once you've done the first page load Twitter's pages will load quite fast and efficiently. While quite a lot of JS, this is good design, not bad.

What's interesting about Twitter's model is that no data actually comes down to the user when they first request a tweet. Twitter builds the page, loads the layout, and initializes the client-side script, which makes a JSON request to pull an individual tweet after everything has loaded. This means that to get the requested information on first load, the user has to wait for a 2MB download, followed by another roundt…

That is not entirely true. If you are authenticated your home_timeline is embedded in the page for instant rendering. Once Twitter moves away from #!'s individual tweets will be embedded as well.

Re: A single tweet page is 2.0 MB

#53
post #38

Earlier quoted context omitted.

Shouldn't it be a higher priority? More and more web users are accessing sites from low powered devices with slow connections that might even have data caps (think tablets or netbooks on 3G networks). Twitter pages don't even seem particularly complex functionally or graphically, so why should the payload be so large?

More and more users are on mobile devices, sure. But those load up the mobile version of the Twitter site, which is very lean.

The mobile version that loads on my iPad is different from the one that loads on my iPhone, and it looks like it uses more javascript. Does anyone know the size of the iPad page?

Re: A single tweet page is 2.0 MB

#54
post #3

His rant doesn't seem too informed: "aggressive anti-performance and apparent contempt for the web by Twitter’s designers" According to his charts most of Twitter's page is JS/CSS and presumably set to heavily cache. Very little is data. Once you've done the first page load Twitter's pages will load quite fast and efficiently. While quite a lot of JS, this is good design, not bad.

Hm, true. But often tweets are insular. When a funny quip is linked you just want to read that.

Re: A single tweet page is 2.0 MB

#56

Earlier quoted context omitted.

Plus if you access Twitter over SSL, there might not be caching resulting in heavy loads repeatedly.

I'd imagine Twitter's serving `Cache-Control: public` where appropriate.

You would think but sadly, no.

They serve the actual tweet as "Cache-Control: no-cache, no-store, must-revalidate, pre-check=0, post-check=0"

https://pastee.org/bzeb5

EDIT: Just to check, I also looked at one of their css resources. https://si0.twimg.com/a/1330626450/t1/css/t1_core_logged_out...

Cache-Control: private, max-age=31449600

So I'm not confident Twitter actually understands how to set things.

PS: Hey Twitter, I can help =)

Re: A single tweet page is 2.0 MB

#57
post #3

His rant doesn't seem too informed: "aggressive anti-performance and apparent contempt for the web by Twitter’s designers" According to his charts most of Twitter's page is JS/CSS and presumably set to heavily cache. Very little is data. Once you've done the first page load Twitter's pages will load quite fast and efficiently. While quite a lot of JS, this is good design, not bad.

I run chrome in incognito mode pretty much 100% of the time, and this totally explains why loading tweets is so freaking slow lately.

Re: A single tweet page is 2.0 MB

#58
post #9

Does anyone know how to get those graphs to show up in the current version of WebKit? They seem to have disappeared or are hidden.

This is a good question. The resource panel from the old Safari 4 webinspector looked that way:

http://www.webkit.org/blog/197/web-inspector-redesign/

Re: A single tweet page is 2.0 MB

#59
post #57
post #3

His rant doesn't seem too informed: "aggressive anti-performance and apparent contempt for the web by Twitter’s designers" According to his charts most of Twitter's page is JS/CSS and presumably set to heavily cache. Very little is data. Once you've done the first page load Twitter's pages will load quite fast and efficiently. While quite a lot of JS, this is good design, not bad.

I run chrome in incognito mode pretty much 100% of the time, and this totally explains why loading tweets is so freaking slow lately.

Chrome caches in Incognito mode. It just doesn't let the cache leak out of the session. So this might explain the first tweet you load being slow, but if you load a second it should be just as fast as in normal mode.

Re: A single tweet page is 2.0 MB

#60
post #5

File this under "annoying to developers and no-one else". Twitter obviously caches 99% of this stuff. I absolutely agree that 2.2MB on one page seems absolutely insane, but that doesn't match up with the experience every time you load the page. And I imagine it's pre-caching code that runs on other pages as well, so you most likely only ever take that download hit once. Yes, they should bring that amount down. No, it…

Shouldn't it be a higher priority? More and more web users are accessing sites from low powered devices with slow connections that might even have data caps (think tablets or netbooks on 3G networks). Twitter pages don't even seem particularly complex functionally or graphically, so why should the payload be so large?

[deleted]
Post reply on HN