On 07.09.2014 10:07, Richard Cotton wrote:
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)


It is an OS "problem": You r OS tries to find some and has to look around waiting for responses. Hence you run into timeouts. If the cached result says some does not exist, you are quick...

Best,
Uwe Ligges



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.


______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to