<div class="gmail_quote">On Tue, Aug 18, 2009 at 12:20 PM, Mike Wilson <span dir="ltr"><<a href="mailto:mikewse@hotmail.com">mikewse@hotmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div>
<div dir="ltr" align="left"><font face="Tahoma" size="2">Michael Nordman<span><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"><div class="im">On Tue, Aug 18, 2009 at 6:07 AM, Mike Wilson <span dir="ltr"><<a href="mailto:mikewse@hotmail.com" target="_blank">mikewse@hotmail.com</a>></span>
wrote:<br>
</div><div class="im"><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><font face="Verdana" color="#0000ff" size="2"> </font></span></div></div></div></blockquote>
<div><span><font face="Verdana" color="#0000ff" size="2">This
might not be the same in other browsers. </font></span><span><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><div class="im">
<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><div><font face="Verdana" color="#0000ff" size="2"><span>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>With
this stated, I'd like to throw out a question</span></font><font face="Verdana" color="#0000ff" size="2"><span> 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></blockquote><div><br></div><div>I don't think any UA is realistically going to do this for v1. But sure, the door should be left open for in the future. (The initial proposal allows for both, btw.)</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div><font face="Verdana" color="#0000ff" size="2"><span></span></font></div>
<div><span class="Apple-style-span" style="font-family: Verdana; color: rgb(0, 0, 255); ">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 face="Verdana" color="#0000ff" size="2"></font></div></div></blockquote><div><br></div><div>I think it being non-trivial is the only issue. When it becomes necessary for performance reasons, I'm sure people will start looking at this.</div>
<div><br></div><div>J</div></div>