Speeding up importing Phobos files

sarn sarn at theartofmachinery.com
Sun Jan 20 03:20:43 UTC 2019


On Saturday, 19 January 2019 at 15:25:37 UTC, Boris-Barboris 
wrote:
> On Saturday, 19 January 2019 at 08:45:27 UTC, Walter Bright 
> wrote:
>> Andrei and I were talking on the phone today, trading ideas 
>> about speeding up importation of Phobos files. Any particular 
>> D file tends to import much of Phobos, and much of Phobos 
>> imports the rest of it. We've both noticed that file size 
>> doesn't seem to matter much for importation speed, but file 
>> lookups remain slow.
>>
>> So looking up fewer files would make it faster.
>
> Sounds rather strange that on modern operating systems, that 
> cache files themselves and the metadata even more surely (VFS 
> directory cache as an example), file lookup is a problem.
>
> Calls to something like glob(3) could render the whole phobos 
> directory tree to your memory in milliseconds.

It's a known problem that Windows can't cache file metadata as 
aggressively as Posix systems because of differences in 
filesystem semantics.  (See 
https://github.com/Microsoft/WSL/issues/873#issuecomment-425272829)

Walter did say he saw benchmarked improvements on Linux for Warp, 
though.


More information about the Digitalmars-d mailing list