Cygwin performance (was [ANN] PW32 the...)

Corinna Vinschen
Thu Mar 16 05:43:00 GMT 2000

Corinna Vinschen wrote:
> [...]
> I'm absolutely sure to get a speed up by the following, without
> the need of another stat-function:
> The current implementation of fhandler_disk_file::fstat() calls
> three different functions which each opens the file independently:
> get_file_owner(), get_file_group(), get_file_attribute(). I've
> already planned to eliminate the first two functions. Instead,
> the complete functionality should be offered by get_file_attribute().
> This makes sense, because get_file_attribute already knows user
> and group. I hope to increase speed noticable that way.

I would like to announce that I could speed up stat() already
by 20-30% on remote drives and around 50% on local drives.

I have done this by the aforementioned patch and additionally by
calling the function `set_process_priviliges()' only once per process
in instead of calling it each time, a file is opened.
Actually this second change was a breakthru.
Further, the call to `num_entries()' in `stat_worker ()' is
only be done if the drive is no remote drive in which case the
st_nlink member of the stat struct is fixed set to 2.

Chris, if you like to see it, I would check it in. I have send it
to cygwin-patches already. There's an additional bugfix which
is described in detail in that mail.

Personally, I will check out another way that could perhaps
result in another 20-50% speed up but this is a bigger (say:
unsafe) change in and


More information about the Cygwin-developers mailing list