Performance of my application becames very low if I enable EurekaLog!
Posted by Alexander Alexeev on 02 April 2009 11:12
|
|
Problem: My application runs significantly slower when I add EurekaLog to the project. Reason: EurekaLog can not slow down your application under normal circumstances - because EurekaLog is not active in your application almost all of the time. The only moments when EurekaLog becames active (and does its work) are:
Therefore a great decrease in application's performance usually means that you abuse exception system - in the sense that your code raising exception very frequently (possible in for/while/repeat-cycle) as its normal execution. Or if you are doing a lot of (small) memory allocations - instead of allocating a large buffer. Or if you are constantly starting threads - instead of using thread pools. Solution: If you have this performance problem only for a specific code area and you don't need to use EurekaLog for it. E.g. if you are using something like this: try // your code except // does nothing end; Then the easiest solution would be to disable EurekaLog for that code block: SetEurekaLogStateInThread(0, False);
try
// your code
finally
SetEurekaLogStateInThread(0, True);
end;
However, if that is not the case - then you need to find out what is causing the performance loss:
Depending on what your findings will be - you can:
| |
|