Re: [R] Reading File Sizes: very slow!

2021-09-27 Thread Rui Barradas
Hello, R 4.1.0 on Ubuntu 20.04, sessionInfo at the end. I'm arriving a bit late to this thread but here are the timings I'm getting on an 10+ years old PC. 1. I am not getting anything even close to 5 or 10 mins running times. 2. Like Bill said, there seems to be a caching effect, the first r

Re: [R] Reading File Sizes: very slow!

2021-09-26 Thread Leonard Mada via R-help
On 9/27/2021 1:06 AM, Leonard Mada wrote: > > Dear Bill, > > > Does list.files() always sort the results? > > It seems so. The option: full.names = FALSE does not have any effect: > the results seem always sorted. > > > Maybe it is better to process the files in an unsorted order: as > stored o

Re: [R] Reading File Sizes: very slow!

2021-09-26 Thread Leonard Mada via R-help
Dear Bill, Does list.files() always sort the results? It seems so. The option: full.names = FALSE does not have any effect: the results seem always sorted. Maybe it is better to process the files in an unsorted order: as stored on the disk? Sincerely, Leonard On 9/25/2021 8:13 PM, Bill

Re: [R] Reading File Sizes: very slow!

2021-09-26 Thread Jiefei Wang
What kind of disk do you use? The hardware differences might be important to this issue. Best, Jiefei Leonard Mada via R-help 于 2021年9月26日周日 下午9:04写道: > Dear Bill, > > > - using the Ms Windows Properties: ~ 15 s; > > [Windows new start, 1st operation, bulk size] > > - using R / file.info() (2nd

Re: [R] Reading File Sizes: very slow!

2021-09-26 Thread Leonard Mada via R-help
Dear Bill, - using the Ms Windows Properties: ~ 15 s; [Windows new start, 1st operation, bulk size] - using R / file.info() (2nd operation): still 523.6 s [and R seems mostly unresponsive during this time] Unfortunately, I do not know how to clear any cache. [The cache may play a role only

Re: [R] Reading File Sizes: very slow!

2021-09-25 Thread Richard O'Keefe
On a $150 second-hand laptop with 0.9GB of library, and a single-user installation of R so only one place to look LIBRARY=$HOME/R/x86_64-pc-linux-gnu-library/4.0 cd $LIBRARY echo "kbytes package" du -sk * | sort -k1n took 150 msec to report the disc space needed for every package. That' On Sun,

Re: [R] Reading File Sizes: very slow!

2021-09-25 Thread Bill Dunlap
On my Windows 10 laptop I see evidence of the operating system caching information about recently accessed files. This makes it hard to say how the speed might be improved. Is there a way to clear this cache? > system.time(L1 <- size.f.pkg(R.home("library"))) user system elapsed 0.482

[R] Reading File Sizes: very slow!

2021-09-25 Thread Leonard Mada via R-help
Dear List Members, I tried to compute the file sizes of each installed package and the process is terribly slow. It took ~ 10 minutes for 512 packages / 1.6 GB total size of files. 1.) Package Sizes system.time({         x = size.pkg(file=NULL); }) # elapsed time: 509 s !!! # 512 Packages