Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2015-03

Startup delay of project (Qt)

11 messages · 5 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Vojtěch Čihák

?
Hi,
?
I have noticed that Qt projects started with F9 have a delay (about ~12 seconds) before the form appears. Its not only with large projects, its also with small projects or even empty forms. ?
The delay is there even if nothing in project changes and I start it by F9 repeatedly. When I try to execute the same project externally (from Double Commander), it starts in ~ 0,3 s. ?
When i switch to GTk2, the startup is within 2 second (from IDE), which is normal. ?
I tried to run Lazarus from console, the last output is: ?
TGDBMIDebugger.StartDebugging WorkingDir="/media/disk/v1/Projects/Components/DividerBevelStyle/" ?
and then it hangs.
The output of Qt and GTk2 doens't differ.
?
I use?Lazarus 1.5 r48159M FPC 3.1.1 x86_64-linux-qt, Qt 4.8.6. ?
I tried to install former revision, I went 1000 commits back but the issue persisted. ?
Thanks for help.

Reply by email

zeljko
to Vojtěch Čihák
Vojt?ch ?ih?k wrote 21 lines
Hi, I have noticed that Qt projects started with F9 have a delay (about ~12 seconds) before the form appears. Its not only with large projects, its also with small projects or even empty forms. The delay is there even if nothing in project changes and I start it by F9 repeatedly. When I try to execute the same project externally (from Double Commander), it starts in ~ 0,3 s. When i switch to GTk2, the startup is within 2 second (from IDE), which is normal. I tried to run Lazarus from console, the last output is: TGDBMIDebugger.StartDebugging WorkingDir="/media/disk/v1/Projects/Components/DividerBevelStyle/" and then it hangs. The output of Qt and GTk2 doens't differ. I use Lazarus 1.5 r48159M FPC 3.1.1 x86_64-linux-qt, Qt 4.8.6. I tried to install former revision, I went 1000 commits back but the issue persisted.

Maybe strace could help.

zeljko

Reply by email

Giuliano Colla
to Vojtěch Čihák: ? ? I have noticed that Qt projects started with F9 have a delay (about ~12 seconds)…

Il 07/03/2015 12:37, Vojt?ch ?ih?k ha scritto:

Show quoted text 9 lines
Hi, I have noticed that Qt projects started with F9 have a delay (about ~12 seconds) before the form appears. Its not only with large projects, its also with small projects or even empty forms. The delay is there even if nothing in project changes and I start it by F9 repeatedly. When I try to execute the same project externally (from Double Commander), it starts in ~ 0,3 s.

[...]

I use Lazarus 1.5 r48159M FPC 3.1.1 x86_64-linux-qt, Qt 4.8.6.

In a similar setup, only with a slightly older Qt (4.7.4), I don't experience the same problem. Qt startup with F9 is a bit slower than GTK2, but within reasonable limits (3 - 4 seconds). A Qt issue?

Giuliano

Giuliano Colla Project planning question: when it's 90% done, are we halfway or not yet?

Reply by email

Vojtěch Čihák
to zeljko: Maybe strace could help. zeljko

Thanks.
?
I execued Lazarus in strace but no it gives no special output. ?
TExternalTool.DoExecute Title="Compile Project, Mode: Default, Target: project1" Process.CurrentDirectory="/home/v1/tmp/" Executable="/usr/local/bin/fpc" Params: -Tlinux
-Px86_64
-MObjFPC
-Shi
-Cg
-g
-gl
-gh
-l
-vewnhibq
-Fiinclude
-Filib/x86_64-linux
-Fu.
-Fu/home/v1/Lazarus_Qt/lazarus/lcl/units/x86_64-linux/qt -Fu/home/v1/Lazarus_Qt/lazarus/lcl/units/x86_64-linux -Fu/home/v1/Lazarus_Qt/lazarus/components/lazutils/lib/x86_64-linux -Fu/home/v1/Lazarus_Qt/lazarus/packager/units/x86_64-linux -FUlib/x86_64-linux/
-dLCL
-dLCLqt
-godwarfsets
/home/v1/tmp/project1.lpr
?
[TCompiler.Compile] end
TMainIDE.DoBuildProject compiler time in s: 3,04200032260269 TMainIDE.DoInitProjectRun ProgramFilename=/home/v1/tmp/project1 [TMainIDE.DoRunProject] Debugger=TGDBMIDebugger
[TMainIDE.DoRunProject] END
TGDBMIDebugger.StartDebugging WorkingDir="/home/v1/tmp/" However, I noticed that when I run project in xterm (via Run parameters ... -> Use launching application), execution is much faster. ?
Also, I tried add 'strace' to command:
?
/usr/bin/xterm -T ?'strace Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine) ?
It also executes project quickly, but gives no output. ?
V.

Reply by email

Martin Frb
to Vojtěch Čihák: ? ? I have noticed that Qt projects started with F9 have a delay (about ~12 seconds)…
Vojt?ch ?ih?k wrote 11 lines
Hi, I have noticed that Qt projects started with F9 have a delay (about ~12 seconds) before the form appears. Its not only with large projects, its also with small projects or even empty forms. The delay is there even if nothing in project changes and I start it by F9 repeatedly. When I try to execute the same project externally (from Double Commander), it starts in ~ 0,3 s. When i switch to GTk2, the startup is within 2 second (from IDE), which is normal.

Just a wild guess.
GDB checks libraries loaded. So depending on the info found on qt libs that may take time.

Try
http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips#internal-error:_clear_dangling_display_expressions set the field "DisableLoadSymbolsForLibraries" to "True"

Or check in options/debugger/event log what is logged. Disable "Module"

Reply by email

Martin Frb
to Vojtěch Čihák
Vojt?ch ?ih?k wrote 7 lines
Thanks, setting DisableLoadSymbolsForLibraries to True did the job. Now I'm on ~2 seconds, it is usual time on my Core2Duo @2GHz.

Is it possible your qt libs have debug info? that might take gdb time to parse (and eat memory too).

Of course, with the above options, you can not debug inside libraries. -------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150307/79be9d20/attachment.html>

Reply by email

Martin Frb
to Vojtěch Čihák
Vojt?ch ?ih?k wrote 18 lines
How can I detect it? I have Qt 4.8.6 from repositories, it should be standart stable version for end-users. ______________________________________________________________ > Od: Martin Frb > Komu: Lazarus mailing list > Datum: 07.03.2015 18:44 > P?edm?t: Re: [Lazarus] Startup delay of project (Qt) Is it possible your qt libs have debug info? that might take gdb time to parse (and eat memory too). Of course, with the above options, you can not debug inside libraries.

Not sure objdump maybe?

I dont know if it is debug info.gdb also reads entrypoints and maybe other things. But since it seems that not everyone has that issue, the question is what is different (not really importiant since the problem is solved).

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150307/bb6b8c86/attachment.html>

Reply by email

Martin Schreiber
to Martin Frb
Martin Frb wrote 24 lines
On 07/03/2015 18:00, Vojt?ch ?ih?k wrote: > How can I detect it? > > I have Qt 4.8.6 from repositories, it should be standart stable > version for end-users. > > ______________________________________________________________ > > > Od: Martin Frb > > Komu: Lazarus mailing list > > Datum: 07.03.2015 18:44 > > P?edm?t: Re: [Lazarus] Startup delay of project (Qt) > > Is it possible your qt libs have debug info? that might take gdb time > to parse (and eat memory too). > > Of course, with the above options, you can not debug inside libraries. Not sure objdump maybe? I dont know if it is debug info.gdb also reads entrypoints and maybe other things. But since it seems that not everyone has that issue, the question is what is different (not really importiant since the problem is solved).

There are distributions which provide separate *.dbg files for libraries. If gdb finds them it may take a while to start...

Martin

Reply by email

zeljko
to Martin Frb: Is it possible your qt libs have debug info? that might take gdb time to parse (and eat…
Martin Frb wrote 11 lines
On 07/03/2015 17:31, Vojt?ch ?ih?k wrote: > > Thanks, > > setting DisableLoadSymbolsForLibraries to True did the job. Now I'm on > ~2 seconds, it is usual time on my Core2Duo @2GHz. > > Is it possible your qt libs have debug info? that might take gdb time to parse (and eat memory too).

Yes, when debug-info libs are installed then it's pretty slow, without it it's same like with gtk2. Qt's debug-info libs are huge.

zeljko

Reply by email