Recent

Author Topic: Lazarus slow to launch...  (Read 2101 times)

1HuntnMan

  • Sr. Member
  • ****
  • Posts: 437
  • From Delphi 7 to Lazarus
    • NewFound Photo Art
Lazarus slow to launch...
« on: September 27, 2025, 05:57:00 pm »
Lately, when I startup Lazarus (Win 11 computer), I can see the forms popping up but then it hangs for 30 secs. and then the rest of the project will launch.  Is there a setting I need to fix or change?

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12207
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus slow to launch...
« Reply #1 on: September 27, 2025, 06:19:43 pm »
Not aware of any settings.

First guess would have been AntiVirus => but if you already see first forms, then AV already let the IDE start, so not sure why it would stop it again.
(unless you only see the splash screen, and you use "startlazarus" which shows the splash, and then loads the actual lazarus.exe)

There shouldn't be any DLL, except if you have packages (like DB stuff) installed, that depends on some dll.

Does that happen when the IDE starts with a new empty project? Or maybe its some file (some very large file) in the project that gets re-opened when you launch the IDE?

You could check the log, start the IDE with "lazarus.exe --debug-log=c:\path\log_name.txt". Or better compile the IDE with -WC  (Tools > Configure build Lazarus), then it will open with a "dos window", and you can watch any log msgs live. So you can see what gets logged when. Maybe there is a clue in that.

cdbc

  • Hero Member
  • *****
  • Posts: 2687
    • http://www.cdbc.dk
Re: Lazarus slow to launch...
« Reply #2 on: September 27, 2025, 07:12:23 pm »
Hi
How many extra packages have you got installed in the Lazarus IDE?
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE6/QT6 -> FPC Release -> Lazarus Release &  FPC Main -> Lazarus Main

Warfley

  • Hero Member
  • *****
  • Posts: 2040
Re: Lazarus slow to launch...
« Reply #3 on: September 27, 2025, 08:20:21 pm »
Also, first launch or also subsequent launches? Like if Lazarus is already open and you open a second instance, is it also slow? And if you open close and re-open?

1HuntnMan

  • Sr. Member
  • ****
  • Posts: 437
  • From Delphi 7 to Lazarus
    • NewFound Photo Art
Re: Lazarus slow to launch...
« Reply #4 on: September 28, 2025, 02:54:29 pm »
Just launched Lazarus and it took about 25 seconds according to my wrist watch.  Only extra components I have installed is JuijiboDB, LazReport and Jvcl DB.  I'm more suspect of Winders 11 at the moment from your comments.  Usually when I startup the computer whether from sleep or from completely off, I launch Laz first. Tomorrow morning, I'm going to launch Winders and wait 10 minutes before launching Laz.  I'm also going to spend some time later just looking for stuff that's loading that seems to creep into Winders that's totally uneccesary esp. launching Task Manager ... thanks

440bx

  • Hero Member
  • *****
  • Posts: 6158
Re: Lazarus slow to launch...
« Reply #5 on: September 28, 2025, 03:30:59 pm »
I suggest you use Process Explorer or System Monitor (formerly Process Hacker) to see what is happening during the Lazarus launch.   

It's quite likely that Defender is the cause of the slow launch and that is instantly visible in either one of those utilities in the CPU utilization and even more in the number of megabytes read.  Anything that does a lot of I/O is going to cause a noticeable slowdown.

FPC v3.2.2 and Lazarus v4.0rc3 on Windows 7 SP1 64bit.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12207
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus slow to launch...
« Reply #6 on: September 28, 2025, 03:36:44 pm »
Only extra components I have installed is JuijiboDB, LazReport and Jvcl DB. 

I don't know them...
Could they be trying to connect to the DB in the background? And especially if the DB server is not running, and it will wait for a timeout....

First make sure its not the project that is being opened (e.g. if it has components of those packages on the form, and they trigger that).
Worst case they try to connect, even if they are not used by the project.

Of course, it could be something else.

n7800

  • Hero Member
  • *****
  • Posts: 650
  • Lazarus IDE contributor
    • GitLab profile
Re: Lazarus slow to launch...
« Reply #7 on: September 28, 2025, 10:20:49 pm »
Maybe you can try running Lazarus with your antivirus completely disabled (Windows Defender)? Don't add files or processes to the exceptions, as I've seen some nuances, and rules may be ignored.

JanRoza

  • Hero Member
  • *****
  • Posts: 739
    • http://www.silentwings.nl
Re: Lazarus slow to launch...
« Reply #8 on: September 29, 2025, 12:21:11 am »
If you have many reports in your project your projects resource file can become big and the bigger the resource file gets the longer the loading of the project may be. At least that's what I experience in some of my projects.
OS: Windows 11 / Linux Mint 22.3
       Lazarus 4.6 RC FPC 3.2.2
       CodeTyphon 8.90 FPC 3.3.1

d2010

  • Sr. Member
  • ****
  • Posts: 257
Re: Lazarus slow to launch...
« Reply #9 on: September 29, 2025, 11:44:06 am »
Lately, when I startup Lazarus (Win 11 computer), I can see the forms popping up but then it hangs for 30 secs. and then the rest of the project will launch.  Is there a setting I need to fix or change?

Please , please you forced win11Lazarus only you have enough experienced with
  multiple compilator/s of Pascal (eg0 delphi7, tp, delphi2009, delplhiXe,) or
 (eg1. Delphi7, Python, Java)  or (eg2. delphi7, C# ,VC#dot, VC+)
because many problems have original from external .dll (Vc2022) not from
Lazarus.
otherwise, You buy older computer and you can forced running Win8Lazarus8(x64)
or you combine Win8Lazarus(x64)  and LinuxLazarus(x32).
 8)



cdbc

  • Hero Member
  • *****
  • Posts: 2687
    • http://www.cdbc.dk
Re: Lazarus slow to launch...
« Reply #10 on: September 29, 2025, 11:55:20 am »
Hi
@d2010: I'm sorry, but that's just useless driwel!!!
/b
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE6/QT6 -> FPC Release -> Lazarus Release &  FPC Main -> Lazarus Main

Thaddy

  • Hero Member
  • *****
  • Posts: 18797
  • Glad to be alive.
Re: Lazarus slow to launch...
« Reply #11 on: September 29, 2025, 11:58:55 am »
Tested two win 11 installs (with jcl added, I normally don't use that)
-1 Intel64 2/4 core @2400 4 GB mem 1 TB spindisk: Lazarus starts in less than ~35 seconds ( very old laptop )
-2 Ryzen 8/16 core @4300 8 GB mem 500 GB ssd: Lazarus starts in less than ~2 seconds ( more recent, but average laptop )

Observe that the resource starved - minimum win11 hardware requirements  - and 6 year old laptop is indeed slow, but still acceptable.
My anti-virus is simply the OS provided Windows Defender. (Anything else makes no sense for home use, remove all others)
« Last Edit: September 29, 2025, 12:17:01 pm by Thaddy »
Recovered from removal of tumor in tongue following tongue reconstruction with a part from my leg.

af0815

  • Hero Member
  • *****
  • Posts: 1409
Re: Lazarus slow to launch...
« Reply #12 on: September 29, 2025, 01:47:17 pm »
My anti-virus is simply the OS provided Windows Defender. (Anything else makes no sense for home use, remove all others)
My experience, some AVs are slow down everithing at startup. Some AV scanner send online samples of the Lazarus and fpc and you have wait minutes ! 
regards
Andreas

Mr.Madguy

  • Hero Member
  • *****
  • Posts: 881
Re: Lazarus slow to launch...
« Reply #13 on: September 29, 2025, 07:45:28 pm »
What I've noticed - is that various tooltips are slow to load. For example one, that can be enabled/disabled via Environment->Object inspector->Info panel. But it's not only thing, that can cause IDE hanging. There is something else. I don't remember, what.

Don't get me wrong - my IDE starts almost instantly (~1s). But once I perform certain operations, IDE can become irresponsive for ~5 seconds. This includes clicking on anything in object inspector, when info panel is active, or trying to make new event handler via double clicking any event. This behavior appeared in one of the latest Lazarus versions. Something related to loading big tooltip DB or initial code analysis, that are performed without multithreading. May be connected to your problem.
« Last Edit: September 29, 2025, 07:59:21 pm by Mr.Madguy »
Is it healthy for project not to have regular stable releases?
Just for fun: Code::Blocks, GCC 13 and DOS - is it possible?

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12207
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus slow to launch...
« Reply #14 on: September 29, 2025, 08:35:54 pm »
What I've noticed - is that various tooltips are slow to load. For example one, that can be enabled/disabled via Environment->Object inspector->Info panel. But it's not only thing, that can cause IDE hanging. There is something else. I don't remember, what.

Don't get me wrong - my IDE starts almost instantly (~1s). But once I perform certain operations, IDE can become irresponsive for ~5 seconds. This includes clicking on anything in object inspector, when info panel is active, or trying to make new event handler via double clicking any event. This behavior appeared in one of the latest Lazarus versions. Something related to loading big tooltip DB or initial code analysis, that are performed without multithreading. May be connected to your problem.

Probably completely different to the OT. But, if it happens, are there any error msgs shown in the "messages" window? (E.g. codetool error, parsing source. ...).
If so, and if your IDE is build with -gl then some of those print a stacktrace to the log (even if there is no log), and that can be very slow (5 to 10 secs each trace).

This (the trace print) can also happen, even if no error is shown in the messages window. You can run with --debug-log=c:\path\log.txt and search that.
Or better you can compile the IDE with -WC (tools > configure build ide), and then get a console window for the IDE in which you can see those infos immediately.

 

TinyPortal © 2005-2018