On 4 Nov 2016, at 13:54, Keith White <[email protected]> wrote:

> The main issue we'll face with attempting to get our code to be thread safe 
> will be IP Arrays.  Our IP arrays are static (in that they are populated on 
> server startup) and without them performance would be very badly degraded

I am in exactly this boat as well.

The way I get round it sometimes is to call a single “initialisation” code 
block for each new process that’s launched. It’s actually not as much overhead 
as it sounds and I used this approach heavily, for example, in a web server 
that was running 20 - 100 web processes that launched and died many times a 
second.

So we could get round this just by moving your “On Server Startup” code to the 
“New Process” or “On Client Connection” event handlers. As long as it doesn’t 
have to run any queries it will be instant an un-detectable in terms of 
performance overhead.

However thats just theory. I’m not even considering it at the moment because 
removing all the IP variables would be a daunting task. I’ll leave that for 
another lifetime ;)

Peter

**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to