[Rd] normalizePath is sometimes very slow for nonexistent UNC paths

Richard Cotton richierocks at gmail.com
Sun Sep 7 10:07:02 CEST 2014


I'm having an issue with occasionally slow-running calls to
normalizePath.  If the path is a non-existent UNC path, then
normalizePath sometimes takes 6 or 7 seconds to run, rather than its
usual few microseconds.  My big problem is that I can't reliably
reproduce this across machines.

The example below generates one or two slow runs out of 10000 on my
Windows machine. I haven't been able to generate slow runs on my Linux
machine, though I've had problems with slow running examples submitted
to CRAN that I suspect may be caused by this.

library(microbenchmark)
(timings <- microbenchmark(
  normalizePath("\\\\some/network/drive", mustWork = FALSE),
  times = 1e4,
  unit  = "s"
))
boxplot(timings)

Please can a few people run this code and see if they can reproduce the issue.

It isn't clear to me whether this is a bug in R or an underlying OS or
network problem.

-- 
Regards,
Richie



More information about the R-devel mailing list