Hi Everyone,

(Yes, I'm finally coming out of hibernation...)

Another approach to the problem, and one I adopted for RSOAP, involved
pre-starting a single process which initialized R.  Then anytime a
request came in, the process forked, resulting in an immediate
'ready-to-go' process to do the work.

-Greg 

-----Original Message-----
From: Renato Alves [mailto:rjal...@igc.gulbenkian.pt] 
Sent: Wednesday, February 18, 2009 4:37 AM
To: RPy help,support and design discussion list
Subject: Re: [Rpy] Keep rpy object loaded in memory after cgi script
ends

>From Paul Geeleher on 02/17/2009 03:56 PM:
> This might sound a bit far out and is likely not possible but I
> thought I'd ask anyway.
> 
> I've got a series of python cgi scripts that do various operations on
> data in an r session via rpy. The only problem is that when each
> script finishes, it has to save the manipulated r session to disk and
> the next script has to load the r session from disk, which can be
> quite time consuming.
> 
> So what I'm wondering is if there is any way of persisting my r
> object, loaded using "from rpy import r" in memory for a certain
> period of time after a cgi scripts execution ends, to be picked up by
> the next script, so as to save the time it takes to repeatedly write
> my session to and read it from the hard disk?
> 
Instead of writing it to disk I suggest you have a look at shared memory
(/dev/shm in linux) or memory mapped files. It's not the ideal solution
since you need to read/write it but it's considerably faster.

-- 
Renato Alves

------------------------------------------------------------------------
------
Open Source Business Conference (OSBC), March 24-25, 2009, San
Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the
Enterprise
-Strategies to boost innovation and cut costs with open source
participation
-Receive a $600 discount off the registration fee with the source code:
SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to