SOLVED: I changed device to Cairo, ran in 1.2secs
ggsave( filename = filename, path = here("img"), plot = art_pic, width = pixels_wide/300, height = pixels_high/300, dpi = 300, type = "cairo" )
UPDATE: I'm hearing that the issue is known as Windows being slow with graphics devices. I will also be testing if there's any improvement in speed using device=cairo
I'm trying to narrow down my issue. Should I expect that ggsave can be super fast on Rstudio cloud whereas it might be MUCH slower on my local machine?
Ive looked at this issue and its not the same thing from what I can tell: ggsave very slow
When running this project in Rstudio cloud, the ggsave takes about 1.5 seconds:
But when running the same code on either of my Windows laptops, the save takes so long, many minutes at least, that I've terminated R instead of waiting for it to save. I mananged to get it to save on the one machine, but took ~1200 seconds to do so.
I have tested on my machine with a very simple plot and it does render and save correctly.
I've tested this on two systems, both running Windows 10.
The one has Rstudio 1.4.x, 8GB of ram and lowly intel graphics card of some sort
The second has has Rstudio 1.2.x. 16GB Ram, Nvidia geforce GTX (oldish but its there!)
To repeat my question: Should I expect that ggsave can be super fast on Rstudio cloud whereas it might be MUCH slower on my local machine? Or should it be sort of comparable? I'm not aware of Rstudio cloud be hyper tuned to execute ggsaves efficiently.