Apple Drops WebKit 2 Code, Adds Multiprocess Browsing

It almost got lost in all the iPhone OS 4.0 stuff, but Apple made a major contribution to the WebKit project yesterday. It’s called WebKit 2, and it adds multiprocess browsing to the WebKit API; it may look similar to what Chromium does, but the difference is that Chromium’s process boundary is not actually part of WebKit.

Apple’s Anders Carlsson made the announcement yesterday on the WebKit mailing list. “WebKit2 is designed from the ground up to support a split process model, where the web content (JavaScript, HTML, layout, etc) lives in a separate process,” Carlsson writes, “This model is similar to what Google Chrome offers, with the major difference being that we have built the process split model directly into the framework, allowing other clients to use it.”

In WebKit-regular, there is no process boundary since the application and renderer sit in one process; there is, however, an API boundary that lies between the application and the WebKit API. In Google’s Chrome/Chromium, the process boundary lies above the API boundary, which makes it hard for other WebKit implementations to make use of it.

“Chromium WebKit does not directly provide a multiprocess framework, rather, it is optimized for use as a component of a multiprocess application, which does all the proxying and process management itself,” the WebKit 2 wiki page explains, “The Chrome team at Google did a great job at trailblaizing multiprocess browsing with Chrome. But it’s difficult to reuse their work, because the critical logic for process management, proxying between processes and sandboxing is all part of the Chrome application, rather than part of the API layer. So if another WebKit-based application or another port wanted to do multiprocess based on Chromium WebKit, it would be necessary to reinvent or cut & paste a great deal of code.”

In WebKit 2, the process boundary lies below the API boundary, which effectively makes multiprocess browsing a core part of the WebKit API. This also explains why it’s called WebKit 2: it’s incompatible with previous implementations.

“We want process management to be part of what is provided by WebKit itself, so that it is easy for any application to use,” the wiki page further explains, “We would like chat clients, mail clients, twitter clients, and all the creative applications that people build with WebKit to be able to take advantage of this technology. We believe this is fundamentally part of what a web content engine should provide.”

This is a great and very welcome contribution from Apple, and should definitely help in spreading the joys of multiprocess browsing across platforms and browsers. It also means that Opera and Firefox are now starting to look even more archaic compared to WebKit-based browsers and Internet Explorer (yes, IE8 implements multiprocess browsing). Get with the program, guys.

43 Comments

  1. 2010-04-09 4:32 pm
    • 2010-04-09 4:37 pm
      • 2010-04-09 5:12 pm
      • 2010-04-09 8:27 pm
      • 2010-04-10 8:31 am
    • 2010-04-09 5:24 pm
      • 2010-04-09 5:52 pm
      • 2010-04-09 5:52 pm
        • 2010-04-09 10:28 pm
    • 2010-04-09 5:39 pm
      • 2010-04-09 5:46 pm
        • 2010-04-09 5:52 pm
          • 2010-04-09 6:00 pm
          • 2010-04-10 1:27 pm
      • 2010-04-09 6:08 pm
        • 2010-04-10 8:30 am
          • 2010-04-11 1:23 am
          • 2010-04-12 2:54 am
          • 2010-04-12 8:18 am
          • 2010-04-12 7:40 am
        • 2010-04-10 11:26 am
      • 2010-04-09 10:30 pm
        • 2010-04-10 5:06 pm
          • 2010-04-11 1:19 am
        • 2010-04-12 1:48 am
      • 2010-04-14 3:19 am
    • 2010-04-09 9:33 pm
    • 2010-04-09 10:40 pm
  2. 2010-04-09 5:03 pm
    • 2010-04-09 5:58 pm
      • 2010-04-09 6:31 pm
        • 2010-04-09 7:43 pm
          • 2010-04-09 8:08 pm
          • 2010-04-09 8:25 pm
      • 2010-04-09 8:49 pm
        • 2010-04-09 10:30 pm
    • 2010-04-09 11:23 pm
      • 2010-04-10 11:59 am
      • 2010-04-12 12:12 am
  3. 2010-04-09 11:18 pm
  4. 2010-04-10 11:38 am
    • 2010-04-11 1:29 am
  5. 2010-04-12 9:40 pm