| From: | Juan José Santamaría Flecha <juanjo(dot)santamaria(at)gmail(dot)com> |
|---|---|
| To: | Andres Freund <andres(at)anarazel(dot)de> |
| Cc: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: A micro-optimisation for walkdir() |
| Date: | 2020-09-05 17:22:23 |
| Message-ID: | CAC+AXB12ukw-D22CcYC4F+=pRqgvcLgh5x2Wa07UaUaD+Q0vWA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Sat, Sep 5, 2020 at 2:13 AM Andres Freund <andres(at)anarazel(dot)de> wrote:
>
> > 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?
>
> That'd be better...
>
At first I did not see how to get DT_LNK directly, but it is possible
without additional calls, so please find attached a version with that logic.
This version also drops the enum, defining just the macros.
Regards,
Juan José Santamaría Flecha
| Attachment | Content-Type | Size |
|---|---|---|
| v4-0001-Skip-unnecessary-stat-calls-in-walkdir.patch | application/octet-stream | 9.4 KB |
| v4-0002-Add-d_type-to-WIN32-dirent-port.patch | application/octet-stream | 1.6 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2020-09-05 17:29:08 | Re: [PATCH] Redudant initilization |
| Previous Message | Ranier Vilela | 2020-09-05 16:40:37 | Re: [PATCH] Redudant initilization |