<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Good old Firefox</title>
	<atom:link href="http://news.qooxdoo.org/good-old-firefox/feed" rel="self" type="application/rss+xml" />
	<link>http://news.qooxdoo.org/good-old-firefox</link>
	<description>The qooxdoo news section</description>
	<pubDate>Wed, 19 Nov 2008 12:09:40 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: qooxdoo &#187; News &#187; Chrome - a browser designed for qooxdoo</title>
		<link>http://news.qooxdoo.org/good-old-firefox#comment-10401</link>
		<dc:creator>qooxdoo &#187; News &#187; Chrome - a browser designed for qooxdoo</dc:creator>
		<pubDate>Tue, 02 Sep 2008 21:58:20 +0000</pubDate>
		<guid isPermaLink="false">http://news.qooxdoo.org/good-old-firefox#comment-10401</guid>
		<description>[...] second ground breaking feature is threaded browsing. In February Thomas has written a nice article about why Firefox should support one JavaScript interpreter per tab. Now a few months later Chome [...]</description>
		<content:encoded><![CDATA[<p>[...] second ground breaking feature is threaded browsing. In February Thomas has written a nice article about why Firefox should support one JavaScript interpreter per tab. Now a few months later Chome [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thomas Herchenröder</title>
		<link>http://news.qooxdoo.org/good-old-firefox#comment-8487</link>
		<dc:creator>Thomas Herchenröder</dc:creator>
		<pubDate>Wed, 19 Mar 2008 20:34:35 +0000</pubDate>
		<guid isPermaLink="false">http://news.qooxdoo.org/good-old-firefox#comment-8487</guid>
		<description>I'm hopelessly late on this one, but there you go...
@Oliver: Thanks for your elaborate comment. Just a few remarks:

Firefox chrome could be run in its own JS thread, with a guaranteed priority. This alone would make the browser more useable since it decouples the UI from JS running in pages.

'Unrelated' pages could run their own JS thread. It might take a bit of figuring out how to exactly determine 'unrelatedness'. But we want some kind of sandboxing anyway, and I don't see a reason why a page loaded from Google and another from Amazon should share anything. It might be too narrow to set unrelated = different windows/tabs, since the JS in one window can open another (sort of a 'child' window) and you want to maintain some connection here. Having a common thread for those seems fine. But other than that?!

Plugins should run in their own threads. If they access a loaded page, yes, locking has to be in place. But since the only data that is contested is the DOM/BOM, this should be doable. E.g. since the browser offers all the APIs, those API calls could be made atomic.

As for event handlers: I don't see an issue here, since the page itself can remain single-threaded. So all code you throw into your page, handlers included, behave the way they did before, synchronous xhr requests blocking and everything. And the risk of any computation being exempted is there already, when you get this pop-up saying "This script takes too much time. Do you want to interrupt it?". Data loss and failing server communication are always possible and should be encapsulated in a transactional protocol on the application level. Still, you could make running event handlers within a page atomic so other threads cannot mess around with them.

And most of all: You could kill a JS thread without killing the whole browser :-).

I do agree with your point that Web developers have to be more thoughtful with respect to their users, though. But again, with a thread for every page, even a synchronous xhr would be acceptable again, since chrome and other pages continue to work while this one page is waiting for the request to return. And this could make some issues in web applications feasible again, when you actually need synchronicity.</description>
		<content:encoded><![CDATA[<p>I&#8217;m hopelessly late on this one, but there you go&#8230;<br />
@Oliver: Thanks for your elaborate comment. Just a few remarks:</p>
<p>Firefox chrome could be run in its own JS thread, with a guaranteed priority. This alone would make the browser more useable since it decouples the UI from JS running in pages.</p>
<p>&#8216;Unrelated&#8217; pages could run their own JS thread. It might take a bit of figuring out how to exactly determine &#8216;unrelatedness&#8217;. But we want some kind of sandboxing anyway, and I don&#8217;t see a reason why a page loaded from Google and another from Amazon should share anything. It might be too narrow to set unrelated = different windows/tabs, since the JS in one window can open another (sort of a &#8216;child&#8217; window) and you want to maintain some connection here. Having a common thread for those seems fine. But other than that?!</p>
<p>Plugins should run in their own threads. If they access a loaded page, yes, locking has to be in place. But since the only data that is contested is the DOM/BOM, this should be doable. E.g. since the browser offers all the APIs, those API calls could be made atomic.</p>
<p>As for event handlers: I don&#8217;t see an issue here, since the page itself can remain single-threaded. So all code you throw into your page, handlers included, behave the way they did before, synchronous xhr requests blocking and everything. And the risk of any computation being exempted is there already, when you get this pop-up saying &#8220;This script takes too much time. Do you want to interrupt it?&#8221;. Data loss and failing server communication are always possible and should be encapsulated in a transactional protocol on the application level. Still, you could make running event handlers within a page atomic so other threads cannot mess around with them.</p>
<p>And most of all: You could kill a JS thread without killing the whole browser :-).</p>
<p>I do agree with your point that Web developers have to be more thoughtful with respect to their users, though. But again, with a thread for every page, even a synchronous xhr would be acceptable again, since chrome and other pages continue to work while this one page is waiting for the request to return. And this could make some issues in web applications feasible again, when you actually need synchronicity.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Oliver</title>
		<link>http://news.qooxdoo.org/good-old-firefox#comment-6857</link>
		<dc:creator>Oliver</dc:creator>
		<pubDate>Fri, 01 Feb 2008 21:44:03 +0000</pubDate>
		<guid isPermaLink="false">http://news.qooxdoo.org/good-old-firefox#comment-6857</guid>
		<description>There are a number of problems in making JS multithreaded, the most significant being the fact the JS in one window can interact with JS in another, so making JS multithreaded would require a significant amount of work due to the additional locking, etc that would be required.  All that locking would have a relatively severe impact on JS performance, at least when accessing the DOM.

The other issue is handling events -- if my page is running a long and complex script, what happens to things like event handlers during that time? For example if i have an onload handler that modifies the state of the enviroment (eg. sets a variable) that shouldn't be allowed (JS is not expected to be threaded) but what happens if i click a link? it turns out you still can't respond as that may interrupt a synchronous xhr and result in data loss.  How do you scroll if there's an event handler on the scroll event?

Opera appears to have resolved these issues, although exactly how safe their solution is is difficult to gauge due to the low market share (so you don't see much noise).  All the other major browsers (Safari, Firefox, IE) just execute JS directly on the UI thread as this is how JS was originally defined, and is the easiest way to ensure the event handlers, etc act in the expected way.   The problem with this is that web developers are not always the most careful of engineers.

A common problem is that a developer will do computation in JS that works fine on their high end machine, but on a low end machine takes significantly longer.  In ordinary applications that's annoying, in web applications due to the JS running on the UI thread the extended runtime prevents the user from using their browser.  Other common mistakes are the use of sychronous io -- eg. synchronous xhr -- which works fine for the developer who is testing behaviour as the may be using smaller data sets, have faster than average connection, etc.  The net result is that they see no interactivity problem, but real users with real datasets end up hit issues where their entire browser has locked up (synchronous xhr blocks JS, which in turn blocks the UI).

In firefox it is more complicated as the chrome is driven by JS, as are extensions, and all this JS can technically interact with the page.  I would guess this makes it event more difficult for firefox to make the js interpreter multithreaded.

It is because of the tendency for developers to make such assumptions that the new html5 database API's are *all* asynchronous.

...

Errr, that ended up being a somewhat longer comment than i intended :-/</description>
		<content:encoded><![CDATA[<p>There are a number of problems in making JS multithreaded, the most significant being the fact the JS in one window can interact with JS in another, so making JS multithreaded would require a significant amount of work due to the additional locking, etc that would be required.  All that locking would have a relatively severe impact on JS performance, at least when accessing the DOM.</p>
<p>The other issue is handling events &#8212; if my page is running a long and complex script, what happens to things like event handlers during that time? For example if i have an onload handler that modifies the state of the enviroment (eg. sets a variable) that shouldn&#8217;t be allowed (JS is not expected to be threaded) but what happens if i click a link? it turns out you still can&#8217;t respond as that may interrupt a synchronous xhr and result in data loss.  How do you scroll if there&#8217;s an event handler on the scroll event?</p>
<p>Opera appears to have resolved these issues, although exactly how safe their solution is is difficult to gauge due to the low market share (so you don&#8217;t see much noise).  All the other major browsers (Safari, Firefox, IE) just execute JS directly on the UI thread as this is how JS was originally defined, and is the easiest way to ensure the event handlers, etc act in the expected way.   The problem with this is that web developers are not always the most careful of engineers.</p>
<p>A common problem is that a developer will do computation in JS that works fine on their high end machine, but on a low end machine takes significantly longer.  In ordinary applications that&#8217;s annoying, in web applications due to the JS running on the UI thread the extended runtime prevents the user from using their browser.  Other common mistakes are the use of sychronous io &#8212; eg. synchronous xhr &#8212; which works fine for the developer who is testing behaviour as the may be using smaller data sets, have faster than average connection, etc.  The net result is that they see no interactivity problem, but real users with real datasets end up hit issues where their entire browser has locked up (synchronous xhr blocks JS, which in turn blocks the UI).</p>
<p>In firefox it is more complicated as the chrome is driven by JS, as are extensions, and all this JS can technically interact with the page.  I would guess this makes it event more difficult for firefox to make the js interpreter multithreaded.</p>
<p>It is because of the tendency for developers to make such assumptions that the new html5 database API&#8217;s are *all* asynchronous.</p>
<p>&#8230;</p>
<p>Errr, that ended up being a somewhat longer comment than i intended :-/</p>
]]></content:encoded>
	</item>
</channel>
</rss>
