Hi,
I've written a sort of script engine which works just great. I uses only 2 global variables, arrays that is. These are all protected using CriticalSections, even with different CS's for the different arrays. That solved quite some of the context switches I had.
On average, I tested that a script comparison takes about 0.04 seconds. I tested this with several hundred entries.
When i call a dll that has about 400 entries calling the script engine, this would take - at max - about 16 seconds. It's just if then else all the way, so if one hits, it exits.
Strange things happen in multi-user mode: when testing with - for instance - 5 clients, the same dll that normally exists withing a second or 4, now takes about 80 seconds, sometimes even more than 100 seconds!!! It still works, the results are OK, nothing crashes but I don't understand the delay.
I thought it was the 'jamming' of critical sections but with the addition of one CS for a specific piece of code, the context switches on the performance monitor are virtually gone.
What can this be? Any hints and ideas on what to look for , design issues etc. are welcome because I'm getting out of ideas [email protected]*!
Suppose it is the waiting for critical sections. How can I tell / measure this?
Hope someone can help.
Regards
Jeroen Brouwers
------------------
I've written a sort of script engine which works just great. I uses only 2 global variables, arrays that is. These are all protected using CriticalSections, even with different CS's for the different arrays. That solved quite some of the context switches I had.
On average, I tested that a script comparison takes about 0.04 seconds. I tested this with several hundred entries.
When i call a dll that has about 400 entries calling the script engine, this would take - at max - about 16 seconds. It's just if then else all the way, so if one hits, it exits.
Strange things happen in multi-user mode: when testing with - for instance - 5 clients, the same dll that normally exists withing a second or 4, now takes about 80 seconds, sometimes even more than 100 seconds!!! It still works, the results are OK, nothing crashes but I don't understand the delay.
I thought it was the 'jamming' of critical sections but with the addition of one CS for a specific piece of code, the context switches on the performance monitor are virtually gone.
What can this be? Any hints and ideas on what to look for , design issues etc. are welcome because I'm getting out of ideas [email protected]*!
Suppose it is the waiting for critical sections. How can I tell / measure this?
Hope someone can help.
Regards
Jeroen Brouwers
------------------
Comment