in Uncategorized

JIT’d JavaScript is all the rage and Microsoft dropped the ball again

There’s a lot of buzz lately about browsers finally getting JIT’d JavaScript. First it was SquirrelFish in WebKit, then FireFox let the cat out of the bag about their implementation called TraceMonkey  and then Google came out with V8 when they unleashed Chrome on the world. Kudos to all of those teams for pushing performance forward since DHTML/AJAX apps these days are really starting to show the signs of weakness in current JavaScript engine implementations. Now’s when I turn this into a rant on how Microsoft dropped the ball again…

Let’s be honest, Microsoft held the crown for quite some time with their ActiveScripting engine. It was a pretty damn good implementation considering it was created in 1996 and only recently did they actually start to care about its performance again. Microsoft has had a .NET based JavaScript engine since .NET 1.0 (announced in 2000, released in Feb. 2002) which runs on the CLR and, as a result, has spanked the crap out of the ActiveScripting engine since day one. Now, granted, IE6 was released in 2001, so there’s pretty much no way it could have been in there, but… why the heck didn’t they switch to it in IE7? They could have been ahead of the curve and probably still hold a performance crown against these other implementations (or at least come close). Better yet, why didn’t they at least switch to that  in IE8?!? In fact, let’s take it one step further! More recently, as work for the Silverlight 2.1 platform, Microsoft has moved ahead with the Dynamic Language Runtime (DLR) initiative and they’ve provided an entirely new, cross platform implementation of the CLR and a DLR flavor of JavaScript which is probably even more efficient. So, even better, why didn’t IE8 build on that? Why didn’t IE8 just take the dependency on Silverlight 2.0 which is a freakin’ ~2meg add-on which at least 1/3 of which is probably made up for by removing ActiveScript. Not only that, but it would help increase the surface area of Silverlight. Can you say “win, win”? I knew you could.

I’ve worked with Microsoft technology my entire career and I’ve seen the various departments blow integration opportunities so many times I’m really starting to get sick of it.  At least the newer projects within Microsoft seem to be doing a better job, so perhaps they’ve finally got some architects in there that are actually taking in the bigger picture and doing a lot more cross pollination, but man to see IE8 blow it again just makes me shake my head. Between keeping the antique ActiveScripting engine and writing yet another version of a rendering engine that is pretty much redoing everything WPF does with no where near the extensibility or features, I just gotta wonder what that team is thinking. They must have a serious case of “not invented here” syndrome and like writing/maintaining a bunch of plumbing code rather than being able to focus on higher level HTML/CSS specific stuff or spending more time building better browser features. *sigh*

Leave a comment

Comment

  1. SquirrelFish wasn’t the first. You’re getting confused between SquirrelFish and SquirrelFish Extreme (understandable). SquirrelFish is the interpreted bytecode version of Webkit’s JavaScriptCore (previously they simply interpreted an AST!). SquirrelFishExtreme is the JIT compilation of those bytecodes and was merged to webkit trunk after Chrome’s V8 was announced.

  2. A few reasons why JScript.Net couldn’t be used in IE:* It’s not ECMAScript compatible – for example, function reflection using toString() is not support.* It was written before Lightweight Code Gen (LCG) was implemented in Whidbey and therefore will leak assemblies as each code block is compiled.* Up until .Net v4, there was no support for multi-version hosting of the CLR in a single process. If IE hosted a particular version of the CLR, then IE would be unable to load other 3rd party components using another CLR version.> Between keeping the antique ActiveScripting engine and writing yet > another version of a rendering engine that is pretty much redoing everything > WPF does with no where near the extensibility or features, I just gotta > wonder what that team is thinkingI totally agree. I don’t understand why MS halted development on the IE rendering engine (trident) and asked the IE team to create WPF, when all the while standards such as HTML and SVG can do what WPF does. If only they’d embraced these standards and innovate on future standards (like WebKit did with CSS Transforms, <canvas>, animations), then we’d all be happy. WPF was a huge waste of resources and a huge frustration to web developers as Trident development was halted.The ‘Developers Developers Developers’ chant certainly wasn’t referring to web devs between 2001 and 2006.

  3. imo they should write a browser completly in .net.. it’d be more secure and proboly lighter weight the ie is today.. not to mention the dlr

  4. RichB,Thanks for the correction on SquirrelFish and good points on JScript.NET. I would have to say that the toString problem could have been sorted out pretty easily since the intial release in a service pack (at least for IE7). As for the assembly unloading what about a separate AppDomain per page? As for CLR hosting, you’re right not much of an answer there until v4. I wonder about process isolation (LCIE) though… shouldn’t that work to solve the CLR problem too? It seems to be the way of dealing with everything else these days.Later,Drew

  5. You know, of all the MS teams working on stuff right now, I really have to hand it to the Windows Live team.Not only are their apps awesome (ahem: Live Writer / Live Mesh / SkyDrive), but they are really taking the initiative and at least with Mesh making them cross-platform. I use Mesh on my iMac, laptop and desktop.I have never been a fan of IE and I avoid it like the plague, being in web development so long. IE7 is so much better than IE6, one hardly needs hacks to get things working. I think 2009, as my manager predicted, will be the year no one supports IE6 anymore. I’m ready to leave it behind.What annoys me is how they can get it all so wrong. Is it too shameful to adopt a Gecko engine or derivative to support web standards? Don’t they know about the Acid3 Test? For shame.