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.
change TraceLevel between INFO and WARNING and note the difference in memory consumption.