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

tim Rowledge tim at rowledge.org
Tue Jan 20 17:54:34 UTC 2015


On 20-01-2015, at 2:22 AM, Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com> wrote:

> 
> 
> 2015-01-20 2:18 GMT+01:00 Eliot Miranda <eliot.miranda at gmail.com>:
> 
> 
> On Mon, Jan 19, 2015 at 5:09 PM, Levente Uzonyi <leves at elte.hu> wrote:
> 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…
> 

I’ve no idea if concurrency is the actual issue in your problem but the simple way to solve any issues with thread related access to files is to rewrite the damned FilePlugin to use a proper api. The separate set-pos & read-bytes + write-bytes is stupid. Use a read-bytes-from-this-pos type api. At least that way you have some confidence you’ll get the bytes you thought you wanted. Not to mention that  -as has been discussed a gazillion times already - FilePlugin and the general file/dir handling in Squeak is extremely grungy.


tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Strange OpCodes: EFB: Emulate Five-volt Battery mode




More information about the Squeak-dev mailing list