read() performance - Linux.too?

Lionello Lunesu lio at lunesu.remove.com
Mon Jul 24 22:57:12 PDT 2006


Derek Parnell wrote:
> On Mon, 24 Jul 2006 04:55:17 +0200, Bob W wrote:
> 
>> /*
>> The std.file.read() function in dmd causes a performance
>> issue after reading large files from 100MB upwards.
>> Reading the file seems to be no problem, but cleanup
>> afterwards takes forever.
> 
> Its a GC effect. The GC is scanning through the buffer looking for
> addresses to clean up.

I just read the response to my post and it seems the read() function 
should do the std.gc.removeRange on the memory containing the read file, 
no? There's no way that memory could contain pointers.

Of course, somebody could change the memory afterwards, replacing 
internal file references with memory pointers and it'll get f**** up.

L.



More information about the Digitalmars-d mailing list