Performance issue, depends on the coe block length

delphi package - automated exception handling

Performance issue, depends on the coe block length

Postby nemopeti » 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)
nemopeti
 
Posts: 10
Joined: Thu Feb 01, 2018 2:05 pm

Re: Performance issue, depends on the coe block length

Postby madshi » Tue Apr 03, 2018 9:53 am

Are we talking about performance issues that only occur during debugging? Or does this problem also occur when running your application outside of the debugger?

And are you 100% sure that madExcept is causing the issue? If you disable madExcept, everything's very fast?
madshi
Site Admin
 
Posts: 9704
Joined: Sun Mar 21, 2004 5:25 pm

Re: Performance issue, depends on the coe block length

Postby nemopeti » Tue Apr 03, 2018 12:05 pm

The issue occures even in Debug, or in the production .exe
Yes I'm sure about, this caused by madExcept, If I disable it and use my error handler routine (witch show the exception message in a messagebox), the message displays instanly after the exception, witouth any time delay.
And also clearly visible, thet the time delay depends on the method body length.

The things can be go even worser, when the user do actions, within this time period, becouse in that case the exceptions go to the message que, and get multiple error message after each other delayed by the time gap.
nemopeti
 
Posts: 10
Joined: Thu Feb 01, 2018 2:05 pm

Re: Performance issue, depends on the coe block length

Postby madshi » Tue Apr 03, 2018 12:14 pm

Can you try to create a little demo project with which I could reproduce the issue on my PC?
madshi
Site Admin
 
Posts: 9704
Joined: Sun Mar 21, 2004 5:25 pm

Re: Performance issue, depends on the coe block length

Postby nemopeti » Tue Apr 03, 2018 12:27 pm

madshi wrote:Can you try to create a little demo project with which I could reproduce the issue on my PC?


Huh, its not so easy, but I'll try it.
nemopeti
 
Posts: 10
Joined: Thu Feb 01, 2018 2:05 pm


Return to madExcept

Who is online

Users browsing this forum: No registered users and 2 guests

cron