SPUG: Mod Perl and persistent objects

Colin Meyer cmeyer at zipcon.net
Thu Jan 27 17:24:39 CST 2000


Peter,

If you are only going to read your data structure, then can load up the 
structure once in the startup (parent) process, and all children will share 
the same copy.  As soon as a child writes to the data structure, then
copy-on-write memory handling will copy the shared pages to the child's memory
space, producing two copies of the structure.

For a more thorough description, see the excellent mod_perl guide:

http://perl.apache.org/guide
and specifically:
http://perl.apache.org/guide/performance.html#Sharing_Memory

-C.

On Wed, Jan 26, 2000 at 07:59:17AM -0800, Peter Darley wrote:
> Friends,
> 	I'm putting together an application, and intend to use Mod Perl.  My
> application will need to load a large data table into memory (~10,000
> records) and I would like to load it into an object once and use it for all
> the perl processes created by Mod Perl.  I have some ideas how to get around
> it if I can't have a single object, but I was hoping that someone out there
> could tell me how to have the single persistent object.  Couldn't find it in
> any documentation.
> 	Thanks for your help!
> Peter Darley
> pdarley at serviceintelligence.com
> 
> 
>  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>     POST TO: spug-list at pm.org        PROBLEMS: owner-spug-list at pm.org
>  Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/
>  SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe
>         Email to majordomo at pm.org: ACTION spug-list your_address
> 

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    POST TO: spug-list at pm.org        PROBLEMS: owner-spug-list at pm.org
 Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/
 SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe
        Email to majordomo at pm.org: ACTION spug-list your_address





More information about the spug-list mailing list