Read-only source files (was: Re: [squeak-dev] Why is source code always in files only?)

Levente Uzonyi leves at elte.hu
Tue Jan 20 01:09:21 UTC 2015


On Mon, 19 Jan 2015, Eliot Miranda wrote:

> 
> 
> On Mon, Jan 19, 2015 at 1:31 PM, Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com> wrote:
>       Hi Tobias,
>       are you aware of CurrentReadOnlySourceFiles cacheDuring: [...]
> This is to workaround the readOnlyCopy used for thread safety which is the main killer of performance...
> 
> 
> IMO this is a bug.  We should simply have a single read-only copy of each sources file and modify the debugger to either save and restore the state of a read-only copy around accessing source, or use its own
> read-only copy (except that the latter approach breaks when one debugs the debugger).  The difference in performance between using CurrentReadOnlySourceFiles cacheDuring: [...] and not in anything that
> accesses source is huge.  And CurrentReadOnlySourceFiles cacheDuring: [...] is a /lot/ of verbiage to type in doits, and a sign that something is wrong.

How would using a single copy solve the concurrency issues?

I think the real solution would be to use per process copies, which were 
initialized lazily, and were closed automatically after some time of 
inactivity.

Levente


More information about the Squeak-dev mailing list