Performance issue, depends on the coe block length
Posted: Wed Mar 28, 2018 5:59 am
Hello,
I use MadExcept in the following scenario:
- the app written ind Delphi 5 and has a main form with aoutocreate the component on it, all the other forms, created by code
- the settings made by tha projects .mad file, generated by the options gui in the IDE
- I have event handler on the component's OnExcept event, within this I filter the exceptions, and transform tha exceptions messges, than show it with Windows.MessageBox
- I have ExceptionHandler with stDontSync, within this I add some extra information to the bugreport
- I have ExceptActionHandler with sDontSync, eitvh filter eaSendBugReport3 wich get the mantis issue Id after send, and eaSendBugReport with some logging and infroms user if newer version avaible
With this configuration I have huge performance problems, based on the method code length. If I debug the code, and raise error by hand: raise EDataBaseError.create('Some evil thing happened!'); the IDE notify instantly, baut it takes 1-7 secons to hit the breakpoint take in the first line of ExceptionHandler function. After that point, all goes fast. It doesn't matther how I configure madExcept (disble treads, extra componenst..etc.), the time gap is there.
The only thing I realize, thet if the method code lenegth greater than about 1000 lines (mine are somtimes hit 4000 line), theere are significant time delay.
If the Exception not created by myself, but the system example: get('RAISERROR(''Some evil thing happened!'',16,1)'); doesn't have any delay, I get hit the breakpint in the ExceptionHandler funcion alomst instantly. (get is a method witch make ado select and gets its result)
But the code above already make the time delay, in a bigger method body (varibles are doubles):
aval:=1;
bval:=0;
val:=aval/bval;
Can someone suggest me some approvement on this? (the: "make fewer lines in your method" sentense is not a suggestion/solution)
I use MadExcept in the following scenario:
- the app written ind Delphi 5 and has a main form with aoutocreate the component on it, all the other forms, created by code
- the settings made by tha projects .mad file, generated by the options gui in the IDE
- I have event handler on the component's OnExcept event, within this I filter the exceptions, and transform tha exceptions messges, than show it with Windows.MessageBox
- I have ExceptionHandler with stDontSync, within this I add some extra information to the bugreport
- I have ExceptActionHandler with sDontSync, eitvh filter eaSendBugReport3 wich get the mantis issue Id after send, and eaSendBugReport with some logging and infroms user if newer version avaible
With this configuration I have huge performance problems, based on the method code length. If I debug the code, and raise error by hand: raise EDataBaseError.create('Some evil thing happened!'); the IDE notify instantly, baut it takes 1-7 secons to hit the breakpoint take in the first line of ExceptionHandler function. After that point, all goes fast. It doesn't matther how I configure madExcept (disble treads, extra componenst..etc.), the time gap is there.
The only thing I realize, thet if the method code lenegth greater than about 1000 lines (mine are somtimes hit 4000 line), theere are significant time delay.
If the Exception not created by myself, but the system example: get('RAISERROR(''Some evil thing happened!'',16,1)'); doesn't have any delay, I get hit the breakpint in the ExceptionHandler funcion alomst instantly. (get is a method witch make ado select and gets its result)
But the code above already make the time delay, in a bigger method body (varibles are doubles):
aval:=1;
bval:=0;
val:=aval/bval;
Can someone suggest me some approvement on this? (the: "make fewer lines in your method" sentense is not a suggestion/solution)