Web Info & Tutorials

February 29th, 2008

FIREFOX 3 PERFORMANCE NUMBERS

Moving on from the “let me use that API” conversation and only some real stuff, urandom (thanks for the comment) let us know about the Cybernet News article on Firefox 3 performance.

They are reporting that Firefox 3 is now faster than Safari 3, and is close to WebKit nightly in certain benchmarks. I can just picture Steve coming down on people saying “we market this as the fastest browser on the planet!” which is tough, as noone stays the fastest for ever. It is a race, and I am sure that WebKit and Firefox will be switching spots a lot in recently years.

Again, this is great news for developers. I am running WebKit and Firefox 3b3 and I am really happy with both. For some tasks I choose one over another (e.g. Firebug, Greasemonkey vs. lean and mean).

I’m sure what most of you care the most about are the facts, and so I’ve compiled the results of the SunSpider JavaScript Benchmark test for each of the different browsers. All of the tests below were performed on the same Windows machine, and the Firefox 3 nightly builds definitely came out on top. Here are the results sorted from best to worst (each one is hyperlinked to the full stats):

  1. Firefox 3 Nightly (PGO Optimized): 7263.8ms
  2. Firefox 3 Nightly (02/25/2008 build): 8219.4ms
  3. Opera 9.5.9807 Beta: 10824.0ms
  4. Firefox 3 Beta 3: 16080.6ms
  5. Safari 3.0.4 Beta: 18012.6ms
  6. Firefox 2.0.0.12: 29376.4ms
  7. Internet Explorer 7: 72375.0ms

It’s important to know that every time you run the SunSpider Benchmark it conducts each test five times, and the result is the average of the five tests. So it is a rather thorough test, and definitely shows off the speed improvements that Firefox 3 is going to be bringing to the table.

Brendan has said that they are not finished with their performance work for Firefox 3, and I am sure the WebKit team isn’t sitting on their hands…. oh and what about IE 8? It will be fun when that is in the wild to be tested.

February 29th, 2008

SNOTO PHOTO: SNOOK, FLICKR AND AIR

After recently installing Snitter, I have to say I’ve become a bit of a fanboy of Jonathan Snook. The guy just produces some good stuff. So when I saw that he announced a new AIR application, I had to get it installed and checked out.

While Snoto (ya know, Snook, Snitter, Snoto) isn’t as polished as Snitter, it’s not meant to be. Jonathan has released this as a foundation for those that want to understand how to build AIR applications.

The goal of this is not to create a Flickr client that “does it all”. It was put together as a reference application for anybody interested in learning more about Adobe AIR. Snoto has been released under a Creative Commons license, so it’s available for you to take and extend how you wish. The link to the source code is included at the bottom of the Snoto page.

This is a great help to many developers as interest in Adobe AIR has skyrocketed since the release of AIR v1.0. MooTools developers should be especially pleased with the fact that Snoto was built using the MooTools JavaScript library, specifically because of the ease with which AIR applications can be developed without jumping through hoops. While other JS libs are now updated to work with AIR’s security model, MooTools was the first to be compatible even during the beta process.

Again, the biggest benefit is to those that want to learn about working with the AIR API:

From the AIR API, I haven’t gone hogwild but rather kept it simple. You can see use of nativeWindow, context menu and EncryptedLocalStore.

Having access to Webkit made styling the interface very straightforward. Like Snitter, it’s a combination of background images, PNG images, and some CSS3/border-radius to round things out.

The Snoto page has been setup with an AIR install badge which should make it easy to check it out.

February 29th, 2008

POWNCE API V2.0 RELEASED

The Pownce team has been working hard to get their API up to speed and have gotten the API to a point where some cool applications can be built from it. Yesterday, they announced v2.0 of the Pownce API:

We’re sorry it took so long for us to release a complete API. We’ve taken great care to provide the best experience for developers and we hope the wait was worth it. Going forward, we’ll be working hard to keep Pownce the best social messaging application out there.

Well worth the wait, new features include:

  • Ability to post notes
  • Ability to post messages, links, files, events and replies
  • Ability to fetch lists of private and friends-only notes.
  • Integration of OAuth token-based web authentication.

This should open the doors for building new custom Pownce clients and applications similar to what’s been done with Twitter.

In addition, the Pownce team has created a new application directory to showcase applications built by developers.

Documentation for Pownce API v2.0 can be found here: http://pownce.pbwiki.com/API+Documentation2-0

February 29th, 2008

XSSINTERFACE: CROSS DOMAIN ACCESS USING POSTMESSAGE AND MORE

Malte Ubl has put together a library called xssinterface (somewhat scary name) that uses postMessage when available, and tries work-arounds when not, to give you cross domain JavaScript access.

How it works

For Browsers that support it, we use the postMessage() interface.

For all other browsers, we use the following mechanism:

All sites that participate in the cross domain calls must provide an html file (cookie_setter.html) that is provided by this library that enables other domains to place certain cookie under the domain of the site.

The library uses this mechanism to place cookies on the target domain that are then read and evaluated by the target page.

Pages must explicitly grant access to their domain by setting a security token cookie under a domain that is allowed to access the callbacks.

As a caller you say:

JAVASCRIPT:
function sayHello() {
  var caller = new XSSInterface.Caller("www.two.com","/cookie_setter.html","channel1");
  caller.call("hello", "Hello World")
}
 

As the listener:

JAVASCRIPT:
window.onload = function () {
  window.xssListener = new XSSInterface.Listener("1234567890","channel1");
  window.xssListener.allowDomain("www.one.com", "/cookie_setter.html");
  window.xssListener.registerCallback("hello", function (msg) {alert(msg)} )
  window.xssListener.startEventLoop()
}
 

It would be nice if the library used cross domain workers if Gears is installed.

February 29th, 2008

FIREFOX 3 MAC PERFORMANCE GAINS DUE TO UNDOCUMENTED APIS

Vladimir Vukićević has posted on the action improvements of Firefox 3 on the Mac, and how digit hack, albeit “dangerous” has helped ton. Vladamir says:

While figuring every this out, I detected that Safari/WebKit didn’t seem to be strained by this framerate container — the fps cadence when Safari was streaming the aforementioned criterion blithely went up beyond 60fps.  After I institute the plist entry, I patterned Safari’s plist and was astonied to conceive that they didn’t hit this unhealthful in there.  Doing whatever more searching, I institute this cipher in WebKit.  Apparently, there is a artefact to do this programatically, along with whatever another engrossing things same enabling pane update pass throttling (though it’s blurred what that means!) — but exclusive if you’re Apple.

All these WK* methods are undocumented, and they materialize in star blobs shipped along with the WebKit maker (see the WebKitLibraries directory).  There are today over 100 clannish “OS-secrets-only-WebKit-knows” in the library, whatever of which are referred to in a mostly comment-free brick file.  Reading the WebKit cipher is pretty interesting; there are every sorts of potentially multipurpose Cocoa internals bits you crapper garner up, more easily on the Objective C lateral (e.g. wager for “AppKitSecretsIKnow” in the code), but also in another areas as a money of these WK* methods utilised in quite a whatever places.  Would whatever another apps same to verify plus of whatever of that functionality?  I’m pretty trusty the respond there is yes, but they can’t.  It’s not modify country low what authorise libWebKitSystemInterface is provided, so that another apps crapper undergo if they crapper unification to it.

David Hyatt, the guru advance of Webkit/Safari commented:

The programmatic unhealthful of coalesced updates should not be open API. It’s actually a rattling chanceful abstract to do. We aren’t rattling bright with that cipher in WebKit, but we had to do it to refrain action regressions in apps that embedded WebKit. Technically it’s criminal though, since we invoke soured the coalesced updates for whatever app that uses WebKit! This includes art they do that doesn’t modify ingest WebKit.

As for the pane pass throttling, that was a pref fashioned for Safari (that we don’t modify ingest whatever more). It’s not clannish or magic. It’s null more than a pref that we crapper investigate from Safari-land, so linking to that is meet silly. ;)

Many of the clannish methods that WebKit uses are clannish for a reason. Either they guy interior structures that can’t be depended on, or they are conception of something exclusive a support that haw not be full formed. WebKit subclasses individual clannish NSView methods for example, and it outlay us whatever some Negro hours to care with the regressions caused by the interior changes that were prefabricated to NSViews in Leopard.

As you yourself blogged, there was a totally unexceptionable open artefact of doing what you necessary to do.

For whatever clannish methods we ingest that we conceive should be public, we (the WebKit team) enter bugs on the pertinent grouping components. Many of these methods hit embellish open over instance (CG clog in Leopard for example). Be certain when you take into WebKit code, since we haw move to ingest the WK method modify though it’s not open API meet because we requirement to impact on Tiger.

Robert O’Callahan is much more battleful and claims platform tilt:

The maker to the WK wrappers is not available; the implementations are in a star blob accumulation that you download with the Webkit sources. It appears the mend determine of approaching the maker to this accumulation is to conceal the signatures of the unsupported support APIs utilised by Webkit, presumably so that ISVs same us can’t ingest them.

A key conception of Webkit on Mac is kept advisedly winking maker by Apple. That’s unfortunate. Instead of hiding the source, a much more cordial contract for Apple would be to attain these APIs open as a concern of course. They haw debate that there are melting APIs that they don’t poverty exposed, but there are structure around that, much as by attachment symbolisation obloquy to limited OS versions (CGContextFooBar_10_4?) and auspicious they’ll meet not be there in forthcoming versions.

It’s worth reflecting that if Microsoft was doing this, they’d probable be hauled before a judge, in the EU if not the US. In fact I can’t request Microsoft ever actuation soured an undocumented-API-fest of this magnitude.

WebKit flies on my Mac, and Firefox 3 has nearly caught up. The modify termination is that I am pretty bright with how browsers are rising their performance, and I am trusty there is a aggregation more to see.

February 29th, 2008

WINDOWS LIVE TEASERS BEFORE MIX

We are waiting for the big news at MIX, mainly revolving around IE 8. We have heard some reports from people who have IE 8 beta that the bugger is a bit of a disappointment, and that it hasn't moved on too much from IE 7, but lets wait and see before passing judgement.

Today though, Dare Obasanjo posted a slew of Windows Live news on several APIs.

The big meta message is the fact that "Microsoft Standardizes on AtomPub". Now I feel like it is time for me to open a pub in the valley and one in Seattle called "The AtomPub" ;)

On the JavaScript side we have the Windows Live Messenger Library where they implemented it in Script#:

The Messenger Library is written in C# and compiled into JavaScript using Script#. Messenger Library applications can be written in either C# (with Script#) or JavaScript. Messenger Library applications can be built using ASP.NET and ASP.NET Ajax, or they can be built independently of the .NET framework.

The code looks very C#-y:

JAVASCRIPT:
try {
  var hash = window.location.hash.substr(1);
  if (window.location.replace == null)
    window.location.replace = window.location.assign;
  window.location.replace("about:blank");
  var name = hash.split("/")[0];
  var win = null;
  if (name && (name != ".parent"))
    win = window.parent.frames[name];
  else
    win = window.parent.parent;
  if (win.Microsoft) {
         win.Microsoft.Live.Channels.Mux._recv_chunk(hash);
  }
} catch (ex) {
  /* ignore */
}
 

You can also use a high level widget to embed chat, which you can see on Dare's space:

Windows Live Messenger

February 29th, 2008

BANK OF MONTREAL MAY ABANDON DEBT RESCUE

"The negotiations with the banks are still ongoing, and Bank of Montreal is still very much a part of that"

According to sources, bank officials recently advised the group of ABCP investors seeking a fix for the market, known as the Crawford Committee, that BMO may no longer be able to honour its commitment to ... via Globeinvestor.com

February 29th, 2008

COMPONENTS OF BROWSER PERFORMANCE

If you could increase the performance of the JavaScript engine that would be great, but it is only one cog in the machine that needs to improve. We have long seen issues to to DOM bottlenecks and the like, and John Resig has gone through and diagramed the pieces (above) and wrote:

What's interesting about all of this is that a lot of attention is being paid to the performance of a single layer within the browser: JavaScript. The reality is that the situation is much more complicated. For starters, improving the performance of JavaScript has the potential to drastically improve the overall performance of a site. However there still remain bottlenecks at the DOM, CSS, and rendering layers. Having a slow DOM representation will do little to show off the improved JavaScript performance. For this reason when optimization is done it's frequently handled throughout the entire browser stack.

Now what's also interesting is that the analysis of JavaScript performance can, also, be affected by any of these layers. Here are some interesting issues that arise:

  • JavaScript performance outside of a browser (in a shell) is drastically faster than inside of it. The overhead of the object models and their associated security checks is enough to make a noticeable difference.
  • An improperly coded JavaScript performance test could be affected by a change to the rendering engine. If the test were analyzing the total runtime of a script a degree of accidental rendering overhead could be introduced as well. Care needs to be taken to factor this out.

So while the improvement of JavaScript performance is certainly a critical step for browser vendors to take (as much of the rest of the browser depends upon it) it is only the beginning. Improving the speed of the full browser stack is inevitable.

February 28th, 2008

TD PROFIT TOPS $1-BILLION MARK

"TD's first quarter demonstrated the strength of our retail businesses in both Canada and the U.S. while our wholesale bank performed well relative to the more challenging financial market conditions we're facing"

Toronto-Dominion Bank reported a 5.3 per cent rise in quarterly profit Thursday, along with 3.5-per-cent dividend increase, in the face of rising loan loss provisions. via The Globe and Mail

February 28th, 2008

BMO A STEP CLOSER TO HUGE WRITEDOWN

"Several levered super-senior transactions entered into by the trusts with several swap counterparties face outstanding calls for additional collateral"

Bank of Montreal is one step closer to a writedown of as much as $495-million after failing to reach an accord to head off the potential collapse of two asset-backed commercial paper trusts that the lender ... via The Globe and Mail