[R] RCurl much faster than base R

Alex Gutteridge alexg at ruggedtextile.com
Fri Dec 5 17:12:18 CET 2014


I'm trying to debug a curious network issue, I wonder if anyone can help 
me as I (and my local sysadmin) am stumped:

This base R command takes ~1 minute to complete:

readLines(url("http://bioconductor.org/biocLite.R"))

(biocLite.R is a couple of KB in size)

Using RCurl (and so libcurl under the hood) is instantaneous (<1s):

library(RCurl)
getURL("http://bioconductor.org/biocLite.R")

I've not set it to use any proxies (which was my first thought) unless 
libcurl autodetects them somehow... And the speed is similarly fast 
using wget or curl on the command line. It just seems to be the base R 
commands which are slow (including install.packages etc...).

Does anyone have hints on how to debug this (if not an answer directly)?

AlexG



More information about the R-help mailing list