Wilke, Claus O
2018-May-29 14:54 UTC
[Rd] Quartz graphic device can be extremely slow in some cases
Hello, We?re receiving reports of extremely slow rendering by users who are using the new geom_sf() feature in ggplot2. Importantly, this seems to be a graphics device issue, because the exact same plot takes vastly different amounts of time to render under different devices. We?re talking about 2 seconds vs. 100 seconds here, so not a small effect. In particular, the quartz device on OS X seems to be particularly slow. It appears to be the case that geom_sf() (which draws complex polygons for maps) hits a code-path in quartz that hasn?t been well optimized for performance. Importantly, on the same machine where rendering a specific map with quartz takes 100 seconds, I can render the map to pdf *and* open the pdf in Preview in about 2 seconds, so there is no fundamental reason why it should take that long with quartz. For discussion and reproducible examples, please see here: https://github.com/tidyverse/ggplot2/issues/2655 https://community.rstudio.com/t/ggplot2-geom-sf-performance/3251 Best wishes, Claus -- Claus Wilke Professor and Department Chair, Integrative Biology The University of Texas at Austin 2500 Speedway, C0930 Austin, Texas 78712 512 232 2459 [[alternative HTML version deleted]]
Juan Telleria Ruiz de Aguirre
2018-May-30 09:01 UTC
[Rd] Quartz graphic device can be extremely slow in some cases
It might be related with this files: https://github.com/wch/r-source/blob/trunk/src/library/grDevices/src/devQuartz.c https://github.com/wch/r-source/blob/trunk/src/include/R_ext/QuartzDevice.h Could we port some of the UNIX optimizations to previous code? https://github.com/wch/r-source/blob/trunk/src/library/grDevices/R/unix/quartz.R
Reasonably Related Threads
- Meaning of /, :, and %in% in lmer
- lme4: How to specify nested factors, meaning of : and %in%
- Could unit.list() from grid package be made an exported function?
- Could unit.list() from grid package be made an exported function?
- Could unit.list() from grid package be made an exported function?