Re: A micro-optimisation for walkdir()

Поиск
Список
Период
Сортировка
От Thomas Munro
Тема Re: A micro-optimisation for walkdir()
Дата
Msg-id CA+hUKGKheopqQSFOWLY4hAqcRf0P=VvMdXEyzkVVvw6U3K50JA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: A micro-optimisation for walkdir()  (Andres Freund <andres@anarazel.de>)
Ответы Re: A micro-optimisation for walkdir()
Список pgsql-hackers
On Sat, Sep 5, 2020 at 9:45 AM Andres Freund <andres@anarazel.de> wrote:
> On 2020-09-02 17:51:27 +0200, Juan José Santamaría Flecha wrote:
> > +     attrib = GetFileAttributes(d->ret.d_name);
>
> Is this really an optimization? The benefit of Thomas' patch is that
> that information sometimes already is there. But here you're doing a
> separate lookup with GetFileAttributes()?

Well as discussed already, our stat() emulation on Windows does
multiple syscalls, so it's a slight improvement.  However, it looks
like we might be missing a further opportunity here...  Doesn't
Windows already give us the flags we need in the dwFileAttributes
member of the WIN32_FIND_DATA object that the Find{First,Next}File()
functions populate?



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: A micro-optimisation for walkdir()
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: WIP: WAL prefetch (another approach)