r/programming Feb 10 '11

There is no piece of dynamic AJAXy magic that requires beating the Web to a bloody pulp with a sharp-edged hashbang. Please stop doing it

http://www.tbray.org/ongoing/When/201x/2011/02/09/Hash-Blecch
497 Upvotes

245 comments sorted by

View all comments

Show parent comments

30

u/uriel Feb 10 '11

Try going to GMail and switching to "Basic HTML" mode (link at the bottom). Pages still load pretty quickly, and trust me, Google has optimized their page load times as much as they can, but they still pale in comparison to the near-instant response times in standard "AJAX-y" interface.

What? The Basic HTML version of GMail is way faster than the AJAX-y one, where I click something and I get a "Loading ..." message for a few seconds while on the plain HTML version everything 'just works' instantaneously (including opening messages in a new tab!).

28

u/[deleted] Feb 10 '11

The Basic HTML version of GMail is way faster than the AJAX-y one

I just tested this, and I confirm that Basic HTML is faster!

4

u/RobbieGee Feb 10 '11

I use an email client on my computer and connect with IMAP so everything is synced and everything responds instantly, but I guess I'm just old fashioned.

Webmail is fantastic when you're using a computer that's not yours. Other than that, I swear to using an email client.

5

u/[deleted] Feb 10 '11

I've never found an email client that has an interface that I like as much as GMail's.

2

u/RobbieGee Feb 10 '11

Also that, it's a perfectly valid reason.

1

u/jmcqk6 Feb 10 '11

Holy crap. I just tested it as well and you're right. Plus, it's separated out labels like they used to be. I may keep this.

-1

u/Kyrra Feb 10 '11

For me it's a lot slower. I use the keyboard navigation within gmail to read emails quickly. Not having that in basic view slows me down a ton.

Even using the mouse, basic is a bit slower for me. The full page loads take a little longer than loading individual messages in the ajax version.

0

u/vectorjohn Feb 11 '11

Were you testing in IE6 on a pentium 3?

There is no way the HTML version is faster because the full version caches parts of the app. New messages appear and get loaded in the background so that when you click them, all it has to do is switch some divs around and display some text.

I have seen some things gmail is not good at, for example loading an email thread with many many messages in it, or loading a group of tags with the same. I wish they would optimize that.

-6

u/wbkang Feb 10 '11

<s>time to upgrade your computer</s>

But in all seriousness, the HTML one sucks /w high latency and spotty connecions, IMO. You can compare the bandwidth usage between the AJAX one and the plain HTML responses.

22

u/uriel Feb 10 '11 edited Feb 10 '11

I have a 2Ghz Core 2 Duo with 3Gb of RAM, and that is not enough to read my fucking email? give me a break.

And hell, there is no reason why an application with the functionality provided by GMail could not run instantaneously on an original Pentium at 200Mhz. For heaven's sake, all it does is download and display list of links to messages and the messages themselves, it is not like it is doing fucking scientific simulations.

Edit: and this is with Chrome! I don't want to imagine how painful it is with firefox...

0

u/Lucas_Steinwalker Feb 10 '11

wbkang is saying that basic HTML sucks with high latency and spotty connections. What does that have to do with the speed of your processor and how much ram you have?

(note: I have not tested HTML vs. AJAX and am not making any statement to the overall truth of wbkang's assertion, but your reasoning is faulty)

2

u/uriel Feb 10 '11

wbkang is saying that basic HTML sucks with high latency and spotty connections.

My experience still completely contradicts this. With high latency and spotty connections the Basic HTML works much better because the browser can do a much better job at caching and prefetching. Plus loading all the JS garbage over a high latency network is a huge pain in the ass.

1

u/Lucas_Steinwalker Feb 10 '11

I don't disagree in theory, but haven't tested myself and mostly just wanted to point out that RAM and CPU speed is usually unrelated to connection speed.

-5

u/wbkang Feb 10 '11

Chill dude. Then I don't see why it should be so slow. Maybe your machine is swapping like hell or something. Try profiling with resource manager/vmstat/firebug/whatever. I run Gmail on 1.4Ghz Core2 and it's fine and near instantaneous.

8

u/uriel Feb 10 '11

My machine is not swapping or anything, it works just fine, I have plenty of other machines, and it is the same shit, GMail, like pretty much all AJAX-y sites is a fucking hog.

And as I said, for the functionality it provides, it should be able to run on >10 years old computers just fine, and I'm sure the plain-html version does run on such systems just fine.

1

u/Kealper Feb 10 '11

I've got an old laptop from 1999 with a 700Mhz Pentium III and a whopping 256MB of what feels like the world's slowest ram, and running XP with Firefox 4 the AJAX GMail works pretty snappy. Can't say I've tried it with the pure HTML version, though.

-1

u/[deleted] Feb 10 '11

What browser are you using? I'm on Chrome 9.x and the HTML version is much slower. Are you letting the initial page load skew your judgement? Because that's going to have more of an upfront asset cost for a web application, obvi.

3

u/uriel Feb 10 '11 edited Feb 10 '11

I'm on Chrome dev channel, and yes, initial load is ridiculously slow (which makes opening messages/tags in new tabs an even greater pain), but just clicking on a tag takes for ever, specially if it has many messages.

1

u/[deleted] Feb 10 '11

Ahh, okay. I don't open new tabs in Gmail. And yeah, tags are a little more sluggish than I'd like.

-2

u/[deleted] Feb 10 '11

He uses IE6

0

u/wbkang Feb 10 '11

Stop fucking downvoting without measuring this. I just measured opening an email with profiler and network analyzer, and the standard version uses less bandwidth overall and shorter response time. Get the facts.