Posts Tagged ‘Web browser’

Web app as a mainstream? Its precursor?

Behind iOS, there were two people, Steve Jobs and John Rubinstein.
Steve Jobs wanted native environment, while John Rubinstein, as far as I know, supported Web as the platform. Choosing Web as its main environment would make existing web developers app developers for iPhone very easily and it means it can catch more market than MS hopefully. However, thanks to Steve Jobs’ tactic, native environment became very popular for developing apps on iOS devices, and it kind of pressed the booming of web development, for the time being at least.

However, after Steve Jobs passed away, what I see nowadays is not the Apple’s dooms day financially, but the rising of Web apps again.

John Rubinstein left Apple and joined Palm and announced WebOS.
It was elegant. It has the refined finish like Apple’s. However, somehow it failed in stealing market share. Well, personally, I couldn’t figure out gestures on the WebOS easily.
However, failure in the market doesn’t make it “BAD” OS.
What is interesting with WebOS was that they sought some performance by making an architecture which allows C++ code hooked from JavaScript frontend.

Now, at Ars Technica site, there were two news articles about the movement of Mozilla. One is to embed Unreal 3 Engine in a Web browser and the other is demonstration of JavaScript-only H.264 decoder achieving 30fps.
Although it may not cover big screen yet, it sounds quite immpressive technological preview and shows lots of potential.

So, let’s keep watching that.

Safari 4 beta for Windows

Finally, Apple announced a new Safari web browser for MS Windows.
I downloaded one and tried using it on my Windows Vista x64 edition installed on my MacBook with Intel GMA chipset, which is a graphic chipset may people don’t like because they prefer nvidia’s.

It turned out that the Safari 4 beta was quite fast. On a MacBook, Internet Explorer 7 is very fast, but the Safari 4 feels faster.

However, I would like to pick what I like the most.

  1. Integrated look for the Windows
  2. No more blurry font rendering
  3. Very clean, minimal style GUI but quite functional and covering most of needs.
  4. Integrated behavior like F4 for showing/hiding menu bar
  5. Probably matured Objective-C/Cocoa environment for the Windows
  6. Good use of the CoverFlow

For 1, it doesn’t look like mimicking Mac OS X on a Windows any more. It feels and looks like “born for MS Windows”.

For 2, the font rendering is very clean. They mentioned that it now uses Windows font, and users can change if they want to use Mac anti-aliased fonts. Many Koreans complaint about the font rendering of the Safari for Windows before. Now, they don’t need to complain about it.

For 3, Oh!

For 4, Pressing Function 4 key shows and hides menu bar of the Safari like other Windows apps on a Windows Vista. How did they do this? I don’t think they used Windows API.

For 5. I have lots things to say. I hope you remember what I wrote at my egloos blog before. I said that it looked like that Apple was preparing Cocoa/Objective-C development environment for the Windows. Yeah.. It is the OpenStep for the Windows, so to speak. Again, with the Safari 4 beta, it seems to be clearer.  Take a look at these screenshots.

objc.dll CoreFoundation, CoreNetwork, CoreGraphic

It is clear that the Safari Beta 4 is written in Objective-C. Was there a objc.dll file for the Windows version of the Safari before?

Also, they maintain Mac’s app style resource.
resources

For 6, I doubt how useful the coverflow is. Apple Inc. found a good way to use it! Bookmark!!!! The CoverFlow fits very well with the concept of bookmark!!!

At first, I thought the introduction of Safari for Windows was not for another browser-war. In my opinion, it was for providing developers a testbed for their iPhone web apps. By attracting web developers, it could be a very popular web-enabled mobile device, and also for hot interest shown by many developers, Apple Inc. could announce iPhone SDK. If the iPhone SDK was announced earlier than Web app development environment, the iPhone native development environment would not get such hot attention.
Another reason I thought was to prepare Cocoa/Objective-C development environment for the Windows.
They had OpenStep for the Windows. They had white-NeXT. So, they secretly had worked on the Mac OS X for the Intel platform.

From the Safari 4 for Windows, at least it became clear that Apple used some environment which had Obj-C tool chain. Because the DLLs are mainly for Core… and other common Unix libraries, it may not be Cocoa/Objective-C yet. But, I don’t see any reason that they don’t have such an environment.
Also, from the Leopard SDK, I see more and more words, i.e. “Windows”, in the Cocoa header files.

In that sense, the Safari 4 for Windows is promising. The Core… thing seems to be well integrated to the Windows environment. So…. it feels like that it is not so far from now to announce Cocoa/Objective-C development environment to write Windows-native programs. Probably… Xcode for Windows?

Ah… there is one thing which is not implemented for the Windows version.
doubleclicking

What is very stupid about the Internet Explore is that you can’t easily select each URL component.
For example, I would type “https://jongampark.wordpress.com”. But I found out that I was not logged in.
So, I would like to type “www.wordpress.com”. On a Mac OS X, whether you use the Firefox or the Safari, double-clicking on the “jongampark” will select it, and you can just type “www”. But with the IE, it is not possible. it selects the whole URL. With the Safari 4 for Windows, it also selects whole thing except for the “http://”.

SquirrelFish Extereme!

As I summarized before, there are 3 strong players in the JavaScript engine field. Due to the Google’s chrome, how fast it is became quite a big issue. The WebKit people raised the bar even more yesterday by introducing SquirrelFish Extreme.

According tot their web site, the new engine is almost 2 times faster than the original SquirrelFish.

But how about the HTML rendering speed? Or the slowness due to use of lots memory space?

JavaScript is not the only factor which can make web browsers faster. 

Anyway, this is a quite good news for web application developers.

JavaScript Performance : V8, Tracemonkey, SquirrelFish, IE8

     A few days ago, the Google announced a beta version of their web browser, called “Chrome”. 

     It has an interesting name, because the word, “Chrome”, is also used for the XML based GUI representation for the Firefox. Anyway, it looks to me that the Chrome, the Google’s web browser, is targeted for Web applications. As you know Web application is very important nowadays for enterprise market, because you don’t need to worry about what platform you must use. Whatever they are, they can share and use the same intranet infrastructure and in-house software if they are Web apps. Thanks to the Google Docs and the Google map, AJAX showed its edge on performance and also its flexibility in designing Web interface. So, current Web apps look like and behave like desktop apps. Will it mean the dead of desktop apps? Hmm.. I don’t know. But anyway let’s keep focused. In this post, I would like to talk about JavaScript performance of the various web browsers.

    Not long time ago, every others were beaten by the IE’s JavaScript performance, not by great margin, but sufficiently big margin. At that time they were interpreter, or VM based implementation. Sure, the JavaScript is a script language. So, it is reasonable approach. And due to the faster CPUs, the Web apps become more visible and started spreading widely. 

    So, I guess people started wanting more from their Web apps. And there are two strong contenders.

One is the TraceMonkey from the Mozilla and the other is the SquirrelFish from the WebKit. (For people who don’t know what is the WebKit, try thinking the Safari or the KHTML. )

     According to the TraceMonkey’s introduction page, native compilation is added to the JavaScript engine, and it uses a technique called “trace tree” from the UC Irvine. As you can see it from their page, linked above, it will be faster in the end, because they have plan to use SSE and Altivec. You can see that how fast it is compared to its predecessor.

TraceMonkey performance enhancement

(Click the image to read the full article)

    On the other hand, the SquirrelFish from the WebKit adopted bytecode compilation and technique similar to the “trace tree”. (Same link to the above link for the WebKit. ) You can see how fast it is compared to is predecessor from this picture.

 

SquirrelFish performance enhancement

SquirrelFish performance enhancement

     Or you can see a graph claimed by the Apple Inc here. But it is not for the SquirrelFish. The SquirrelFish is much faster JavaScript engine than the one used for the currently announced Safari browser.

 

Safari vs. IE and other on JavaScript performance

Safari vs. IE and other on JavaScript performance

     I did NOT read the paper on the “trace tree”, so I’m not sure how much different the techniques used for the SquirrelFish and the TraceMonkey. If anyone read it and compared them, please post what the differences are.

     Now, it is time for the Chrome’s V8.

According to its introduction page, it compiles the JavaScript source code and thus makes a native code. Let’s take excerpt from the page.

V8 compiles JavaScript source code directly into machine code when it is first executed. There are no intermediate byte codes, no interpreter. Property access is handled by inline cache code that may be patched with other machine instructions as V8 executes.

So, unlike the SquirrelFish, it is compiled to the native code. Therefore it should be faster than the SquirrelFish. It also uses other technique : Fast Property Access, Efficient Garbage Collection

How fast is the V8? Let’s take a look at it.

Performance Comparison

Performance Comparison

(The unit is in ms. So, the shorter is better)

Chrome test

Performance Comparison

 ( The longer is better )

 

Performance Comparison

Performance Comparison

( The unit is in ms. So the shorter is better. )

For more detailed explanation, please visit Wayne Pan’s blog.

What is interesting here is that Wayne used FireFox 3.1 Nightly [1.9.1b1pre/200809020331. According to his test, the V8 is faster. But in a mozillazine’s blog, it says the other way.

 

Is the TraceMonkey faster than the V8?

Is the TraceMonkey faster than the V8?

But even at the MozillaZine’s blog, it points out the cases which is slower than the V8.

 

TV vs. V8

TV vs. V8

 

According to this article, the Mozilla will be 7x faster in the end.

     So, they share something common that they are not based on interpreters anymore. VM can be thought as a better interpreter, but…. anyway.. Especially the TraceMonkey, i.e. TM, shares lots of things with the SquirrelFish. 

     Many of you will think that the TraceMonkey and the V8 are in native code, while the SquirrelFish is in bytecode, so the SquirrelFish is slower. Well.. yeah.. I think so. But probably the SquirrelFish can be faster in the long run. I guess there is reason Apple inc chose the SquirrelFish. In the next version of the Mac OS X, so called the Snow Leopard, more dynamic execution of code will be incorporated, called “Grand Central”. Also, to enhance security in the code and to adapt the performance more to specific cases, the execution of the binary code will be dynamically changed. For example, if clause’s execution path can be different under different cases, even though the whole if.. else.. block is same. So, implementing it in bytecode can have more potential in dynamical executed environment. So, we can’t conclude which approach is better yet.

(How about the Linux? Will it have similar technology like the Grand Central? )

     By the way, don’t forget that you can use the WebKit as a HTML engine while you can choose the SquirrelFish or the V8, as the Google does for its Chrome browser. ( Yeah.. in your code, you can use the WebKit, SquirrelFish and the V8 in your codes! )

     Currently, the Google advertised the Chrome more well than the Mozilla Firefox 3 and the WebKit. So, people are amazed by the Chrome performance, although they use very similar techniques and its performance is similar to those of others. This is the power of marketing or using journalism!

%d bloggers like this: