Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> that "bundle/t1-more" file is a whopping 4 129 653 characters.

I'd have to imagine that 355kb is the compressed size, but that character count (assuming one byte characters, not UTF8) works out to be 3.938 megabytes.

That's a lot of code. Even more when you consider it's been minified.



Why do we have to imagine and then speculate from there? This is trivial to inspect.

It's 1.34mb on disk uncompressed but still minified. The copy Twitter is hosting right now is 1409121 characters minified but uncompressed. I have to assume the 4mb mentioned is output from some middle step (closure compiler output?) I'm not arguing the merits of that filesize, just that it's definitely not 4mb.


I ran into this problem last night and ended up looking at the script. File size is 4,129,653 bytes, on a single line. I had it saved to check out what the problem was, so here it is if you want to check it out yourself: https://dl.dropbox.com/u/24903613/hn/twitter-4MB-line.js

Link to it on Twitter's servers (I uploaded to dropbox just in case the file expires or is changed): http://a0.twimg.com/c/phoenix/en/bundle/t1-more.5d72926b7850...


This was what I was served and was referencing when I wrote that: https://dl.dropbox.com/u/21496507/t1-more.f1f23c393561.js

I don't feel like digging through minified javascript though, so I have no clue what the discrepency is.


Interesting. The difference could be A/B testing or serving up different scripts to different browsers.

At a quick glance you can definitely see some differences between the different scripts we were served. For instance, in the one you were served there are some unminified portions that include the license notice for some of the code (easyXDM). In the script served to me there are no unminified portions, with everything being served on a single line.


Ugh, look at all the whitespace from the compiled mustache. Embarrassing.


Does anyone have the numbers of Gmail JS size?


According to Firebug: roughly 250 KB is transferred, half of that is lazy loaded (after DOMready, I suppose) and it looks like the biggest file (75KB) is from Google+. All scripts uncompressed (not un-minimized) weigh about 740 KB.


Makes me wonder if it's the difference between a different language being compiled to minified Javascript vs. minified Javascript.


~790k (min) in IE8




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: