On Windows I have recently updating R from 3.1.2 to 3.2.2 and updating all packages I am using as well (including cairoDevice). Now I observe that plotting under gWidgets2 shows a very poor performace, especially for pch=16,17,18:
library(gWidgets2,gWidgets2RGtk2)
options(guiToolkit="RGtk2")
win <- gwindow("Plot a figure",expand=TRUE)
gg <- ggraphics(container=win,expand=TRUE)
a <- seq(0,100,0.1)
for (b in 1:20){
par(pch = b)
plot(c(0,100),c(0,100))
start_time <- Sys.time()
points(a,a)
end_time <- Sys.time()
print(paste("pch =",b,"time to plot:",end_time-start_time))
}
which gives:
[1] "pch = 1 time to plot: 0.134000062942505"
[1] "pch = 2 time to plot: 0.0380001068115234"
[1] "pch = 3 time to plot: 0.0569999217987061"
[1] "pch = 4 time to plot: 0.0550000667572021"
[1] "pch = 5 time to plot: 0.0409998893737793"
[1] "pch = 6 time to plot: 0.0379998683929443"
[1] "pch = 7 time to plot: 0.0859999656677246"
[1] "pch = 8 time to plot: 0.10699987411499"
[1] "pch = 9 time to plot: 0.0929999351501465"
[1] "pch = 10 time to plot: 0.180000066757202"
[1] "pch = 11 time to plot: 0.0740001201629639"
[1] "pch = 12 time to plot: 0.0859999656677246"
[1] "pch = 13 time to plot: 0.184999942779541"
[1] "pch = 14 time to plot: 0.062999963760376"
[1] "pch = 15 time to plot: 0.871000051498413"
[1] "pch = 16 time to plot: 49.2030000686646"
[1] "pch = 17 time to plot: 17.3880000114441"
[1] "pch = 18 time to plot: 24.2620000839233"
[1] "pch = 19 time to plot: 0.174000024795532"
[1] "pch = 20 time to plot: 0.128999948501587"
Without gWidgets2 the numbers are well below 0.1 sec. This effect is reproducable. Collegues of mine do see the same.
It must have to do with packages which I updated. Because when I remove R 3.2.2 and install 3.1.2 I don't get back the performance I had before updating everything.
Any idea??