Feature request: make file.exists interruptable

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Feature request: make file.exists interruptable

Christopher Hammill
Hi R developers,

On slow file systems with large lists of files, file.exists can take a long time to run. It would be nice if users could interrupt this function. I think it would be simple to add:

https://svn.r-project.org/R/trunk/src/main/platform.c,

at line 1373, add "R_CheckUserInterrupt();" perhaps every some number of iterations if performance is a concern here.

Thanks,

Chris


________________________________

This e-mail may contain confidential, personal and/or health information(information which may be subject to legal restrictions on use, retention and/or disclosure) for the sole use of the intended recipient. Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. If you have received this e-mail in error, please contact the sender and delete all copies.

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: Feature request: make file.exists interruptable

Prof Brian Ripley
The place for feature requests is bugs.r-project.org .

On 15/04/2019 18:44, Christopher Hammill wrote:
> Hi R developers,
>
> On slow file systems with large lists of files, file.exists can take a long time to run. It would be nice if users could interrupt this function. I think it would be simple to add:
>
> https://svn.r-project.org/R/trunk/src/main/platform.c,
>
> at line 1373, add "R_CheckUserInterrupt();" perhaps every some number of iterations if performance is a concern here.

It is a concern, and it is (very) unusual to call file.exists() on more
than one file (as its name implies).  Perhaps you could give us some
idea of what you are trying to do and how many files take how many
seconds on what OS/filesystem.

For completeness, dir.exists() can be used with more than one path and
potentially has the same issue.

--
Brian D. Ripley,                  [hidden email]
Emeritus Professor of Applied Statistics, University of Oxford

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: Feature request: make file.exists interruptable

Christopher Hammill
Thanks Dr. Ripley,

Unfortunately it is no longer possible for new users to file bugs on the the R bugzilla. The current guidelines on https://www.r-project.org/bugs.html say to post here:

NOTE: due to abuse by spammers, since 2016-07-09 only �members� (including all who have previously submitted bugs) can submit new bugs on R�s Bugzilla. For now, either post (e-mail) your bug report to R-devel or ask an R Core member to add you manually to R�s Bugzilla members.

Would you be able to add me to the bugzilla so that I can raise this there?

Thanks,

Chris
________________________________
From: Prof Brian Ripley <[hidden email]>
Sent: April 16, 2019 10:24 AM
To: Christopher Hammill; [hidden email]
Subject: Re: [Rd] Feature request: make file.exists interruptable

The place for feature requests is bugs.r-project.org .

On 15/04/2019 18:44, Christopher Hammill wrote:
> Hi R developers,
>
> On slow file systems with large lists of files, file.exists can take a long time to run. It would be nice if users could interrupt this function. I think it would be simple to add:
>
> https://urldefense.proofpoint.com/v2/url?u=https-3A__svn.r-2Dproject.org_R_trunk_src_main_platform.c&d=DwICaQ&c=Sj806OTFwmuG2UO1EEDr-2uZRzm2EPz39TfVBG2Km-o&r=lNvpYHQ4ryl-NV5xIfGm88weE3pfbkzPUhFP6JD9S0k&m=Cnn1q_4cCTrMD3ai1HxEiW5hlvocyLp-aeYwakHTkEg&s=txQR4ftIfgjYw9N4viGK_6JZv3sMwOk4VBRXQBVqTeI&e=,
>
> at line 1373, add "R_CheckUserInterrupt();" perhaps every some number of iterations if performance is a concern here.

It is a concern, and it is (very) unusual to call file.exists() on more
than one file (as its name implies).  Perhaps you could give us some
idea of what you are trying to do and how many files take how many
seconds on what OS/filesystem.

For completeness, dir.exists() can be used with more than one path and
potentially has the same issue.

--
Brian D. Ripley,                  [hidden email]
Emeritus Professor of Applied Statistics, University of Oxford

________________________________

This e-mail may contain confidential, personal and/or health information(information which may be subject to legal restrictions on use, retention and/or disclosure) for the sole use of the intended recipient. Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. If you have received this e-mail in error, please contact the sender and delete all copies.

        [[alternative HTML version deleted]]


______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel