[kepler-users] Slow R script outputting vectors of ~1000s elements, using RExpression

ben leinfelder leinfelder at nceas.ucsb.edu
Wed Jun 3 09:24:53 PDT 2009


Jean-Michel,
I believe the "_read()" that is being performed is for harvesting the  
R console output (what becomes the text emitted from the RExpression  
"output" port). This does not affect the actual data tokens that you  
are likely emitting via a different output port that you've created on  
the RExpression actor (say "myStringArray").
I have a hunch that you can reduce the runtime if you neglect to write  
the ~50000 element arrays to the console. Perhaps you can display a  
subset of the arrays for debugging purposes and have the best of both  
worlds. I'm not positive this will be a silver bullet - but it's worth  
a shot.
Also note that we are waiting for the entire R script to execute  
before output is read - you might see if the R script is time- 
intensive when run in R outside of Kepler.

Hope these suggestions point you in a helpful direction,

-ben

On Jun 3, 2009, at 7:03 AM, <Jean-Michel.Perraud at csiro.au> wrote:

> Hi,
>
> I have an actor that outputs three arrays of strings of ~50000  
> elements each. It takes several minutes to complete, but the cpu is  
> far from in use. While I have only a cursory understanding of what  
> is happening and of the eclipse debugger, it seems sensible to think  
> that this is due to the use of Thread.sleep in Rexpression, e.g.:
>
> 		public void run() {
> 			while (_keepRunning) {
> 				// System.out.println("Starting read");
> 				_read();
> 				try {
> 					Thread.sleep(100);
> 				} catch (Exception e) {
> 					System.out.println("Error in TestApp while sleeping!");
> 				}
>
> While this is not a blocker for me, has anyone advice?
>
> Regards
>
> _______________________________________________
> Kepler-users mailing list
> Kepler-users at kepler-project.org
> http://mercury.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users
>




More information about the Kepler-users mailing list