We have a few database-intensive reports being generated by Active4D. Whenever one of these reports is being generated, it appears that Active4D [on the server] is dominating the server's CPU, so that everyone else's processes are getting crowded out. My coworker says that, when doing database-intensive operations, processes [at least from Client] are throttled. I suggested that, since Active4D is a plugin, it's not as strictly bound by the 4D Scheduler. Are we on the right track, or barking up the wrong tree?

Active4D is an _extremely_ good citizen. It yields unconditionally to the 4D scheduler after every line of code is executed. So the behavior you are seeing is not because of Active4D per se.


If it jogs anyone's memory, the report we're currently investigating does extensive set operations [union, difference, intersection] on sixteen sets of about 8500 records each.

My profiling of typical Active4D page execution showed that 25% of the execution time was spent within the 4D database engine. In addition, if you take a look at the list of 4D commands I support, you will see that those set commands are implemented via an internal EXECUTE. I had no choice, they are not supported by the plugin API. This adds some overhead to their execution.


To isolate Active4D as a variable, I would suggest putting the report generating code into a 4D method and calling that method from Active4D. Then you will see how much of the CPU is being used by the 4D database engine.

You also might want to consider running the reports from a Client asynchronously. I know that in the SQL world reports are usually run when there is little other client activity because they hog so much of the database engine.

Regards,

   Aparajita
   Victory-Heart Productions
   [EMAIL PROTECTED]
   www.aparajitaworld.com

   "If you dare to fail, you are bound to succeed."
   - Sri Chinmoy   |   www.srichinmoylibrary.com




Reply via email to