RE: Could perl fastCGI load an external executable prog ramme as a daemon process using "system"?
Sujay Koduri <[email protected]>
| Newsgroups | gmane.comp.web.fastcgi.devel |
|---|---|
| Message-ID | <8C004E20A28812439C0E651674CC71230164A418@blrmailserv.BANGALORE.COM> |
you can do this by creating a shared memory segment and bring the whole dictionary to shared memory segment at the start of program itself. This shared memory segment will be there in memory till you explicitly delete that or you restart the machine. If you are doing any write operations on the shared memory segment, then you need to preserve the concurrency by using the semaphores. or you can use some third party libraries like libmm to get all this work done. Hope this helps you. sujay _____ From: He Nan [mailto:[email protected]] Sent: Monday, November 28, 2005 7:34 PM To: fastcgi-developers-xGejAJT2w6yOE5Ap4OspEtHuzzzSOjJt@public.gmane.org Subject: [FASTCGI] Could perl fastCGI load an external executable programme as a daemon process using "system"? In my script there is an external C programme , I have to call it every time when the script runs . But the C programme needs to load big dictionary , the time consuming is more than 5 seconds . What should I do to make it more efficient , could I modify the C programme so that when it runs for the first time , the dictionary is loaded into the memory and never free until service is shutdown , or shall I try mod_perl to write a module in c ? I'm confused , for I'm a beginner to CGI programming . ___________________________________ fastcgi-developers mailing list http://fastcgi.com/fastcgi-developers/