Re: A micro-optimisation for walkdir()

From: Juan José Santamaría Flecha <juanjo(dot)santamaria(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: A micro-optimisation for walkdir()
Date: 2020-09-02 15:51:27
Message-ID: CAC+AXB3urjeAOEAaU6Fb0uQsDhMYzmQpELkO9tMVW_ixU56pAw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Sep 2, 2020 at 4:35 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Thomas Munro <thomas(dot)munro(at)gmail(dot)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 Content-Type Size
0002-Add-d_type-to-WIN32-dirent-port.patch application/octet-stream 2.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2020-09-02 16:12:01 Re: Group by reordering optimization
Previous Message Pavel Borisov 2020-09-02 15:42:57 Re: [PATCH] Covering SPGiST index