Performance: only add log record and sql statement to context if trace/debug level <= debug/info
Description
Log records and logged sql statement increase the context size significantly. We don't need that for production and hence should only add that to context if tracelevel is set to INFO and below.
Minor clean up and add synchronized to CLogErrorBuffer.publish method (it needs to be thread safe).
AD_Issue is another source that can add significant overheat to the system. If your system is tight in resources, you might want to consider setting the "Error Reporting" flag at "System" window to false.
Testing:
change TraceLevel between INFO and WARNING and note the difference in memory consumption.
Environment
None
Activity
Heng Sin Low
April 21, 2021 at 12:07 PM
If you need it, you can just revert it. It doesn’t break anything other than it is just bad for performance and memory usage.
Thomas used this context variable to let a process know the SQL that the user constructed with Find in a window.
Via a process parameter he's passing the SQL, as he didn't find other way to connect the process with the dataset from the window that was called.
The workaround to solve temporarily that problem was to set the log level on INFO (and BTW setting log level didn't work fine, we needed a server restart to take the change).
But that is a temporary measure and we're thinking that we need the variable back - do you think is OK just to revert the IF? Or better add some SysConfig variable?
Log records and logged sql statement increase the context size significantly. We don't need that for production and hence should only add that to context if tracelevel is set to INFO and below.
Minor clean up and add synchronized to CLogErrorBuffer.publish method (it needs to be thread safe).
AD_Issue is another source that can add significant overheat to the system. If your system is tight in resources, you might want to consider setting the "Error Reporting" flag at "System" window to false.
Testing:
change TraceLevel between INFO and WARNING and note the difference in memory consumption.