Skip to content
Prev 10282 / 12125 Next

[R-pkg-devel] Unusually long execution time for R.utils::gzip on r-devel-windows

I can confirm that this has to fixed in R.utils. This gist is that
R.utils does lots of validation of read/write permissions, and deep
down it rely on system("dir") as a fallback method. If this is down
toward dirname(tempdir()), then it'll find a lot of files, e.g.

    [1] " Datentr?ger in Laufwerk D: ist Daten"
    [2] " Volumeseriennummer: 1826-A193"
    [3] ""
    [4] " Verzeichnis von D:\\temp"
    [5] ""
    [6] "17.02.2024  09:06    <DIR>          ."
    [7] "14.02.2024  03:36                 0 cc6H4Sp5"
    [8] "15.02.2024  03:46                 0 cc6PwKb4"
    [9] "15.02.2024  16:25                 0 cc6RH27v"
   [10] "16.02.2024  01:50                 0 ccafzzMl"
   ...
[99997] "09.02.2024  04:48    <DIR>          RtmpURWDbA"
[99998] "14.02.2024  04:35    <DIR>          RtmpURWeVC"
[99999] "15.02.2024  04:00    <DIR>          RtmpUrwhHU"
 [ reached getOption("max.print") -- omitted 17165 entries ]
Time difference of 18.67841 secs

So, yeah, wow!  I'll look into fixing this, probably by removing this
fallback approach, which is very rarely needed; it was added way back
when Sys.readlink() didn't cover all cases.

/Henrik

On Fri, Feb 16, 2024 at 9:24?PM Henrik Bengtsson
<henrik.bengtsson at gmail.com> wrote: