Re:Twitter crashes itself with commas
by jlarocco on Tuesday July 17, 2012 @03:01PM
(#4257267)
It'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:
If the rest of their stuff is like that, a 4MB Javascript file doesn't surprise me at all.
[ Parent
| on HN ]
Now 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.
I 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.
It 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...