[R] How to speed the shut down of the graphic device

Philippe Hupé Philippe.Hupe at curie.fr
Mon Aug 4 10:08:13 CEST 2003


Prof Brian Ripley a écrit :

>On Mon, 4 Aug 2003, Philippe Hupé wrote:
>
>  
>
>>Andrew C. Ward a écrit :
>>
>>    
>>
>>>Dear Philippe,
>>>
>>>Perhaps you could try a different graphics device (maybe
>>>postscript). On my machine, the time differences were all 1
>>>second rather than the 3 you reported.If 300s is really
>>>too long for you, you could get a new computer or run your
>>>script on a faster one.
>>>
>>>      
>>>
>>I have a computer with 3GHz processor (Pentium IV) and 2 Go of RAM so I 
>>don't think this is a matter of computer performance :).
>>    
>>
>
>My lowly 1.4GHz P4M laptop does it in 2.5 secs, so there does seem to be a 
>performance problem with your computer.
>
>BTW, the way to time a command is to use system.time()
>
>  
>
>>>Andrew C. Ward
>>>
>>>CAPE Centre
>>>Department of Chemical Engineering
>>>The University of Queensland
>>>Brisbane Qld 4072 Australia
>>>andreww at cheque.uq.edu.au
>>>
>>>
>>>Quoting Philippe Hupé <Philippe.Hupe at curie.fr>:
>>>
>>> 
>>>
>>>      
>>>
>>>>hello,
>>>>
>>>>I use R1.7.1 under winXP and I am running the following
>>>>script example :
>>>>
>>>>
>>>>for (i in 1:10)
>>>>{
>>>>       x <- rnorm(100)
>>>>       png( paste("D:/essai",i,".png",sep=""))
>>>>       plot(x)
>>>>       t1 <- Sys.time()
>>>>       dev.off()
>>>>       t2 <- Sys.time()
>>>>       print(t2-t1)
>>>>      
>>>>}
>>>>
>>>>at each step, it takes about 3 seconds to shut down the
>>>>graphic device. 
>>>>I want to generate about one hundred of image and of
>>>>course it takes too 
>>>>much time. Is there any trick ?
>>>>
>>>>Philippe
>>>>
>>>>______________________________________________
>>>>R-help at stat.math.ethz.ch mailing list
>>>>https://www.stat.math.ethz.ch/mailman/listinfo/r-help
>>>>
>>>>   
>>>>
>>>>        
>>>>
>>>.
>>>
>>> 
>>>
>>>      
>>>
>>
>>    
>>
>
>  
>
I have done the same thing under Debian/sid wiht R1.7.1 and it takes 
almost 0 second !! Then, is there any problem with winXP ?

-- 

--------------------------------------------------

Philippe Hupé
Institut Curie - Equipe Bioinformatique
26, rue d'Ulm - 75005 PARIS France
+33 (0)1 42 34 65 29

Philippe.Hupe at curie.fr <mailto:Philippe.Hupe at curie.fr>




More information about the R-help mailing list