Recent

Author Topic: Application 10xTime slower in IDE  (Read 1033 times)

Bearimprint

  • New member
  • *
  • Posts: 7
Application 10xTime slower in IDE
« on: February 13, 2021, 12:45:09 pm »
Hi all

Strange story.
My application was working fine in IDE (for several months)  until y close the windows "Even Log" during a debug session.
After that, appli is running 10 time slower than before in IDE (but work like allway launching the .exe directly)
I don't understand where is the issue.
Any idea ?


marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: Application 10xTime slower in IDE
« Reply #1 on: February 13, 2021, 02:22:09 pm »
Things like thread creation and dynamic dll loading (e.g. if you measure startup performance) might be slower in the debugger.

Maybe also having things like outputdebugstring()


Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9794
  • Debugger - SynEdit - and more
    • wiki
Re: Application 10xTime slower in IDE
« Reply #2 on: February 13, 2021, 02:29:32 pm »
until y close the windows "Even Log" during a debug session.
Probably a coincidence. But you can re-open it...

Likely causes:

Maybe your app has a lot of exceptions? You would have them on the ignore list, but the debugger has to check the type of exception each time. So each exception hit will cause a small delay.

Or you have conditional breakpoints,  (check menu > view > debug windows > breakpoints). They still stop to check the conditions.
(Same with breakpoints that have the "break" option disabled, but may do other work)
You could try disabling all breakpoints and test....


If it is one of those, options are limited

1) try fpdebug. (package LazDebuggerFp / Tools > Options > Debugger / search wiki)
  It still has the same limits as above, but may take less time.

2) In Lazurus svn trunk, the gdb based debugger has an option (in the property grid / Tools > Options)
  InternalExceptionBreakPoints => Disable at least ieRaiseBreakpoint (you can disable all).
  However then the debugger will never stop at any exception.



If neither of the above is the case then probably more info is needed.

Does the slowdown occur while the app is starting? Or is it during the entire lifetime of the app?

For "app is starting", it might be loading dll taking more time. (Of course that can happen at any time, if your code uses LoadLibrary a hell of a lot)
In that case (if using the gdb based debugger), find the option
   DisableLoadSymbolForLibraries and set it to true.
You can do that in any case, unless you write your own dll, and want to debug your own dll.

Bearimprint

  • New member
  • *
  • Posts: 7
Re: Application 10xTime slower in IDE
« Reply #3 on: February 14, 2021, 09:36:06 am »
Thanks for your reply.
I will test your suggestions.


 

TinyPortal © 2005-2018