<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3395" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT face=Tahoma size=2>Michael Nordman<SPAN
class=729083718-18082009><FONT face=Verdana
color=#0000ff> wrote: </FONT></SPAN></FONT></DIV>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=gmail_quote>On Tue, Aug 18, 2009 at 6:07 AM, Mike Wilson <SPAN
dir=ltr><<A
href="mailto:mikewse@hotmail.com">mikewse@hotmail.com</A>></SPAN>
wrote:<BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Threading:<BR>This
is the unavoidable question ;-) How do you envision<BR>multiple threads
accessing this shared context to be<BR>coordinated?<BR></BLOCKQUOTE>
<DIV>Nominally, they don't. In our design for chrome's multi-process
architecture, the global-script would only be shared within a single
'renderer' process (in which all page's, and global-scripts, execute in a
single thread).<SPAN class=729083718-18082009><FONT face=Verdana color=#0000ff
size=2> </FONT></SPAN></DIV></DIV></BLOCKQUOTE>
<DIV><SPAN class=729083718-18082009><FONT face=Verdana color=#0000ff size=2>This
might not be the same in other browsers. </FONT></SPAN><SPAN
class=729083718-18082009><FONT face=Verdana color=#0000ff size=2>I think you
need to define how concurrent access should be handled so it can be applied
to f ex a browser using a single process but a thread per
top-level window. If I understand correctly it would be something like letting
only one thread call inside the GlobalScript context at a
time?</FONT></SPAN></DIV>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Process
boundaries:<BR>In this past discussion there have been several
mentions<BR>about having to cluster "pages" inside the same process<BR>if
they are to share data.<BR>Why is this so, and why can't shared memory or
proxied<BR>objects be an option for browsers doing
process<BR>separation?<BR></BLOCKQUOTE>
<DIV class=gmail_quote>A multi-process browser vendor probably *could* proxy
all script calls to a truely global context across all 'renderers'... but that
is not required in the proposal... and is probably even discouraged.</DIV>
<DIV class=gmail_quote><FONT face=Verdana color=#0000ff size=2></FONT><FONT
face=Verdana color=#0000ff size=2></FONT><BR></DIV>
<DIV class=gmail_quote>One of the motivations for doing this is webapp
performance. Proxying all script interactions across the page/context boundary
works against that. Also synchronization issues get much more
complicated.</DIV>
<DIV class=gmail_quote><FONT face=Verdana color=#0000ff size=2></FONT><FONT
face=Verdana color=#0000ff size=2></FONT><BR></DIV>
<DIV class=gmail_quote>Implicit in the proposal is that a global-script is
very inexpensive to interact with.</DIV></BLOCKQUOTE>
<DIV><FONT face=Verdana color=#0000ff size=2><SPAN
class=729083718-18082009>Certainly, the ideal case is that they are in the same
process. Using proxies is coming back to serialization all over again, although
transparent. What I was commenting was the (seemingly widespread) notion
that it is impossible to share data between process, which is not true. There is
nothing stopping an implementation from using direct calls whenever process
sharing is possible, and falling back to proxies in cases when processes need to
be different. </SPAN></FONT></DIV>
<DIV><FONT face=Verdana color=#0000ff size=2><SPAN class=729083718-18082009>With
this stated, I'd like to throw out a question</SPAN></FONT><FONT face=Verdana
color=#0000ff size=2><SPAN class=729083718-18082009> on what do you want
the most - max performance in 100% of cases, but redundant GlobalScript
contexts, or max performance in most cases and singular GlobalScript
contexts?</SPAN></FONT></DIV>
<DIV><FONT face=Verdana color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Verdana color=#0000ff size=2><SPAN
class=729083718-18082009>Also, what about shared memory (I'm assuming everybody
knows what this is) - apart from being non-trivial stuff, are there any
specific drawbacks that renders it not useful for this case?</SPAN></FONT></DIV>
<DIV><FONT face=Verdana color=#0000ff size=2><SPAN
class=729083718-18082009></SPAN></FONT> </DIV>
<DIV><FONT face=Verdana color=#0000ff size=2><SPAN class=729083718-18082009>Best
regards</SPAN></FONT></DIV>
<DIV><FONT face=Verdana color=#0000ff size=2><SPAN
class=729083718-18082009>Mike</SPAN></FONT></DIV></BODY></HTML>