

The New MobileMe Login Page Has Some Badass JS - devongovett
http://badassjs.com/post/1649735994/the-new-mobileme-login-page-has-some-badass-js

======
kreek
That is indeed some badass JS, but why does it send my CPU to 100% and turn
both the fans on my MacBook Pro, I thought only Flash did that?

~~~
tomlin
You must be mistaken. The fan was installed for Flash. This is why Flash needs
to die; so Apple can exclude the fan and make a smaller, lighter notebook.

~~~
nitrogen
I'm not familiar with Apple-related net memes, but is this a joke or is it the
actual reason for having a fan? If it's not Flash that makes the CPU run at
100%, it could be anything else. I'd hate to have a notebook that I couldn't
run at 100% CPU if I wanted to. Let me encode video on the go, or run a
parallel build. Removing the fan when there's still a thermal vulnerability
would be unwise.

~~~
chc
The background: A lot of Mac users (myself included, in the interest of
disclosure) feel that Flash's performance on the Mac is piss-poor in the
average case (e.g. making the fans go wild even when not doing anything all
that fancy) and advocate for Web standards like HTML and JavaScript to be used
in its place wherever possible, because at least those can be improved
independent of Adobe, whom they perceive to be lax in supporting niche
platforms. Other people feel that this first group is deluded by Apple
propaganda and naive to believe that JavaScript performance will be any better
than Flash. Thus, the parent was mocking these JavaScript advocates on the
basis that the scripts on this page were performing badly on the GP's system.

~~~
gregschlom
And the fact that this script is made by Apple itself only adds to the irony

~~~
melling
Sounds like a perfect opportunity for Chrome, Firefox, Opera, or a new company
to build a better browser than Safari. Apple is using an open technology
implemented by several competing organizations.

------
gnufs
It makes CPU usage go through the roof though.

However nice it's looking, I'm not sure if it's such a good idea to have such
a battery life eating page as your login site.

~~~
xtacy
With the push for hardware accelerated rendering, I think this CPU hog should
slowly go away.

~~~
pmjordan
I don't see how they're going to hardware accelerate _canvas_ much, unless you
stick to very specific operations, i.e. never touch individual pixels. GPUs
are great at splatting polygons all over the place; running arbitrary
JavaScript to generate pixel values, not so much. Reading back pixel values
from the rendering surface is pretty much out of the question altogether.

Unless you meant the fact that WebGL seems to be taking shape, or the hardware
accelerated CSS3 effects. (I doubt HTML/CSS rendering is hogging the CPU here)

------
kristiandupont
_Sigh_ , soon the days where FlashBlock makes the web nice and calm (and easy
on the cpu) will be gone.

~~~
jjcm
I suppose you could always create a no-canvas plugin, as well as one that
stops <video> and <audio> tags from playing. Sure, it wont be as simple as
striping out any embeded .swf's in the page, but that's not to say it isn't
possible. Where there's a demand, there will be a plugin.

And hey, there's always links.

~~~
jeroen
Given the context, you probably mean Lynx.

<http://en.wikipedia.org/wiki/Lynx_%28web_browser%29>

~~~
anon-e-moose
<http://en.wikipedia.org/wiki/Links_%28web_browser%29>

(and <http://en.wikipedia.org/wiki/ELinks> )

=)

------
fictorial
That is some pretty iCandy indeed.

------
mikeryan
Looks like Apple is starting to eat its own dog food. Want flash style without
Flash? Do it in JS.

------
ahrjay
If by badass you mean horrible, then yes. It browser sniffs and then adds
classes to the html element depending on which rendering engine, version and
platform you're using. e.g. in FF 3.6 the html element has "mozilla windows v3
v3-6".

------
brianwillis
Doesn't work in Google Chrome for some reason. You just get a simplified
version (no sparkly goodness). Anyone care to speculate why Apple made this
decision, given that Safari and Chrome are both webkit based?

~~~
jonursenbach
I see it just fine in 7.0.517.44.

~~~
jjcm
(All browsers are tested in Ubuntu 10.10 unless otherwise mentioned)

Chrome 8.0.552.11 dev - works

Chromium 7.0.517.44 (64615) - works

Firefox 3.6.12 - Shows a "browser not supported" page, clicking through makes
it work just fine. Did notice though that the animation only happens when the
window has focus - probably a nice addition so it doesn't chomp CPU time in
the background.

Firefox 4.0b8pre - Fails. Blank screen.

Opera 10.60 (6344) - "Browser not supported" page. Animations do not work,
logo doesn't render. Seems to fail gracefully (login fields still accessible).

IE6 (windows xp) - Fails. Does not degrade gracefully.

IE 7.0.5730.13 (windows xp) - Different warning page than FF/Opera. Degrades
gracefully, no animation.

So far seems to be pretty focused on webkit browsers. No huge surprise there.
What was interesting was that IE6 wasn't supported at all. There isn't even
any "continue anyway" button after the "browser not supported" page.

~~~
archangel_one
Works okay for me at first in Firefox 4.0b7 - but after a few seconds of
playing with the sparkles following my mouse (nearly as childish as it sounds)
it abruptly stops and they vanish. No JS error reported.

------
city41
In Safari (OSX), as the little balls touch an iDevice, it lights up a bit, and
eventually the device is fully lit up. On Chrome (also OSX), this effect is
missing.

------
FluidDjango
Interestingly different (but still very attractive) in Opera or FF.

