<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jan 21, 2013 at 3:21 PM, Bert Freudenberg <span dir="ltr">&lt;<a href="mailto:bert@freudenbergs.de" target="_blank">bert@freudenbergs.de</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>How do we make that single copy thread-safe?</div></div></blockquote><div><br></div>
<div>IMO the only context in which its really important that source access is thread-safe is the debugger; one is debugging source access and the Debugger is fetching source from methods as one is debugging, hence screwing up the source access one is debugging.  So what if the Debugger took care to save the readOnlyCopy&#39;s position around each source fetch and restored it?  Wouldn&#39;t that be good enough and allow one to get away without making it thread-safe?</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><span class="HOEnZb"><font color="#888888"><div><br></div><div><span style="border-collapse:separate;border-spacing:0px;font-family:&#39;Lucida Grande&#39;;font-size:12px"><div style="font-family:Helvetica">
- Bert -</div><br></span></div></font></span><div><div class="h5"><div><div>On 21.01.2013, at 15:06, Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>&gt; wrote:</div><br>
<blockquote type="cite"><div dir="ltr">IMO the readOnlyCopy logic is broken.  e should modify SourceFiles to keep a *single* read-only copy alongside each writable copy, and supply that when asked for a read-only copy.  The read-only copy is effectively a cache.  It needs to be flushed when a source file changes and when the image starts up.  Again I have code for this from a modified 3.9 image if anyone is interested.  IMO this is important.</div>

<div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jan 21, 2013 at 11:35 AM, Vaidotas Didžbalis <span dir="ltr">&lt;<a href="mailto:vaidasd@gmail.com" target="_blank">vaidasd@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>&gt; Seems instantaneous for me on Mac. Might be a platform issue? Which VM, which OS?<br>
&gt;<br>
&gt; - Bert -<br>
</div> Windows 7 64 bit, Cog Dec 12, 2012<br>
bottleneck in method<br>
CurrentReadOnlySourceFiles&gt;&gt;defaultAction<br>
slow part is accessing changes file:<br>
time to run: [SourceFiles second readOnlyCopy]  is ~ 100 ms. Caching<br>
is introduced here some time after 4.1. On XP 32 bit without antivirus<br>
there is no issue.. aha, perhaps this is antivirus related. Quite<br>
common in corporate policy in environments today. Will try tomorrow to<br>
disable antivirus and report.<br>
Vaidas<br>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div>
</div>
<br></blockquote></div><br></div></div></div><br><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div>
</div></div>