In article <[EMAIL PROTECTED]>, Boris Zbarsky <[EMAIL PROTECTED]> wrote:
> Henri Sivonen wrote: > > Is http://www.mozilla.org/newlayout/doc/threading.html still accurate? > > It's never been accurate... in fact, the very first sentence of the overview > is > false. There is in fact a single UI thread shard by all windows. Having all that stuff run in a single thread seems scary, but my view of threading is heavily influenced by Java. > > The tag soup parser and expat still run in the UI thread, right? > > That's correct. > > > (Seems counter-intuitive to me. Was this done in order to accommodate the > > old > > Mac OS?) > > I suspect it was done to avoid the performance issues involved with dribbling > the DOM across thread boundaries bit by bit.... Considering how often the beach ball of death shows up with Firefox, I'm inclined to think that having more thread synchronizations and context switches might be a lesser evil. > > When expat is parsing, does the UI thread pump chunks of data to > > XML_ParseBuffer so that the event loops processes events in between the > > XML_ParseBuffer calls? > > Yes. Exactly. XML_ParseBuffer sits behind an nsIStreamListener and runs > when onDataAvailable is called. OK. > > Is there any particular reason why the XML content sink does not force a > > reflow once in a while if the parsing takes a long time? > > No particular reason, except for the fact that there are cases when this is > not doable (eg when XSLT is involved) Ah, gotta love XSLT. Luckily the style sheet PI is seen before the root element start tag and it does not make sense to ask for a reflow before that. > and that in the other cases you have to > carefully keep track of what parts of the DOM have already been passed off to > the rest of the application (the HTML content sink does this; the code could > perhaps be shared or at least adapted). Why? Do the other parts of the app keep private copies? Which other parts? How is the situation with the content sink appending stuff to the DOM different from a script appending stuff except that with the content sink the reflow needs to be explicit? -- Henri Sivonen [EMAIL PROTECTED] http://iki.fi/hsivonen/ Mozilla Web Author FAQ: http://mozilla.org/docs/web-developer/faq.html _______________________________________________ mozilla-layout mailing list [EMAIL PROTECTED] http://mail.mozilla.org/listinfo/mozilla-layout
