bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#13539: Use fdopendir, fstatat and readlinkat, for efficiency.


From: Paul Eggert
Subject: bug#13539: Use fdopendir, fstatat and readlinkat, for efficiency.
Date: Tue, 29 Jan 2013 16:56:37 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130106 Thunderbird/17.0.2

On 01/28/2013 06:37 AM, Eli Zaretskii wrote:
> perhaps a
> further optimization would be to avoid the call to
> file_name_completion_stat if completion-ignored-extensions is devoid
> of elements that end in a slash.

Yes, something like that might make sense.

>> +  fd = (int) name;
>           ^^^^^
> I think we should use ptrdiff_t rather than int here, since that could
> make a difference in 64-bit builds on Windows.

Unfortunately that won't work because the existing API uses int elsewhere
and we can't easily change int to ptrdiff_t there.
But there's another approach: simply set fd = 0, and use 
dir_pathname inside w32.c.  This should be good enough for what Emacs needs.
Revised patch attached.

Attachment: fdopendis.txt
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]