3 ms·
The main page for the site I work on makes extensive use of jquery, jquery ui, backbone, a crapton of custom javascript, and more of the OpenLayers library than
by awj 14y ago
The main page for the site I work on makes extensive use of jquery, jquery ui, backbone, a crapton of custom javascript, and more of the OpenLayers library than most places I've seen. It weighs in at 330kb and has a decent bit of fat to trim.
What on earth are the people at twitter doing that warrants that much code? Maybe their single page app -> dedicated page transition was more about disabling some things and rewiring urls with the plan of taking advantage of the dedicated setup later?
- notatoad 14y agomost of twitter is still on single page app. they announced the change back to dedicated pages, but only rolled it out to user pages so far, afaik.
- jlarocco 14y agoIt's been a long time since I looked at the Twitter API, but I remember some of their API responses being hilariously inefficient. I don't remember the specifics, but something like retrieving a user's tweets the JSON would include a user "object" with every tweet message. The response would be something like this: [{user: {name: 'jlarocco', userid: 1, /* 50 other attributes */}, message: 'my first tweet', id: 1, time: 123456}, {user: {name: 'jlarocco', userid: 1, /* 50 other attributes */}, message: 'my second tweet', id: 2, time: 123498}, /* similar thing 18 more times */] If the rest of their stuff is like that, a 4MB Javascript file doesn't surprise me at all.
- shock3naw 14y agoNow that Twitter is 'stable,' the API is being overhauled and they are moving away from being a single page application. You forget Twitter has been dealing with technical debt for years. The fact that Twitter still runs on Rails and serves as much traffic as it does is testament to what the engineers there have built.
- riffraff 14y agoI think recently they added some options to omit nested informations in apis. OTOH, duplicated data _is_ easier to handle and produce and probably on the wire efficiency wasn't a big concern in the original twitter app.
- vacri 14y agoIt reminds me back in the day of the 'to html' converter in Microsoft Word. If you had a table in the original document, the converter would needlessly specify all the typeface information in each individual cell...