Re: A micro-optimisation for walkdir() - Mailing list pgsql-hackers

From Juan José Santamaría Flecha
Subject Re: A micro-optimisation for walkdir()
Date
Msg-id CAC+AXB3urjeAOEAaU6Fb0uQsDhMYzmQpELkO9tMVW_ixU56pAw@mail.gmail.com
Whole thread Raw
In response to Re: A micro-optimisation for walkdir()  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: A micro-optimisation for walkdir()  (Thomas Munro <thomas.munro@gmail.com>)
Re: A micro-optimisation for walkdir()  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers


On Wed, Sep 2, 2020 at 4:35 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Thomas Munro <thomas.munro@gmail.com> writes:
> You don't need to call stat() just to find out if a dirent is a file
> or directory, most of the time.  Please see attached.

Hm.  If we do this, I can see wanting to apply the knowledge in more
places than walkdir().

Win32 could also benefit from this micro-optimisation if we expanded the dirent port to include d_type. Please find attached a patch that does so.

Regards,

Juan José Santamaría Flecha
Attachment

pgsql-hackers by date:

Previous
From: Pavel Borisov
Date:
Subject: Re: [PATCH] Covering SPGiST index
Next
From: Tomas Vondra
Date:
Subject: Re: Group by reordering optimization