Recent

Author Topic: Lazarus IDE compiling is too slow for me!!  (Read 3772 times)

vfclists

  • Hero Member
  • *****
  • Posts: 1146
    • HowTos Considered Harmful?
Re: Lazarus IDE compiling is too slow for me!!
« Reply #15 on: February 21, 2024, 12:00:52 am »
When that is done you need to setup a RAM-Drive, find out in your file explorer how big the installation for lazarus including fpc is and set the RAM-Drive to that ammount + 1GB extra.
Given how well Unix uses its disk buffers, I doubt that would have much benefit to be honest. Its already Nvme2 and while compiling does trigger some "device contention", not much, its just about "RAM" anyway.  Unless, as TRon mentioned, the hardware setup is less than optimal. Thats unlikely with a box setup with 16G ram.

vfclists - can you give us your definition of "slow" - how long to Build so many lines of code ?

Davo

How do I count the number of lines compiled?
Lazarus 3.0/FPC 3.2.2

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2269
  • Fifty shades of code.
    • Delphi & FreePascal
Re: Lazarus IDE compiling is too slow for me!!
« Reply #16 on: February 21, 2024, 12:04:18 am »
Last time I did such for myself was on Windows Vista (yes I had [hate] it... puke) with a mechanical HDD and a bloated up Delphi installation.
With a few tricks I've set up a 64bit Ramdrive that was able to use my current Delphi.
Startup speed: from about "i go make a coffee" drained to "look out of window and back on monitor" - done
Compilation speed: from 3 minutes down to less than 3 seconds
So yes, I was happy at that time :D

Since my experience with non-Windows is like 0, you guys know what you talk about, I just can tell about my experience.
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2269
  • Fifty shades of code.
    • Delphi & FreePascal
Re: Lazarus IDE compiling is too slow for me!!
« Reply #17 on: February 21, 2024, 12:08:28 am »
How do I count the number of lines compiled?
Use "-vi" switch and watch in message window what the compiler tell you.
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

dbannon

  • Hero Member
  • *****
  • Posts: 3156
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Lazarus IDE compiling is too slow for me!!
« Reply #18 on: February 21, 2024, 12:12:25 am »
Yes, back in the days when I used Windows, ram disks were always a good idea. But that was Windows2000 for me.

I am still amazed how long it takes to unzip the Lazarus source on Windows compared to exactly the same hardware running Linux. (Like, 5 times as long ?) But truth is, Linux lies to you, it says "yep, I have that, next ?" but it is still writing, behind the scenes, to disk.

Davo

Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

dbannon

  • Hero Member
  • *****
  • Posts: 3156
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Lazarus IDE compiling is too slow for me!!
« Reply #19 on: February 21, 2024, 12:14:00 am »
How do I count the number of lines compiled?
Code: [Select]
$> wc -l *.pas
Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

vfclists

  • Hero Member
  • *****
  • Posts: 1146
    • HowTos Considered Harmful?
Re: Lazarus IDE compiling is too slow for me!!
« Reply #20 on: February 21, 2024, 12:37:49 am »
How do I count the number of lines compiled?
Use "-vi" switch and watch in message window what the compiler tell you.

Is it "-vi" of "-vl"?

I see "-vl" Show line numbers but I can't see -vi anywhere.

Is it entered manually somewhere?
Lazarus 3.0/FPC 3.2.2

TRon

  • Hero Member
  • *****
  • Posts: 3660
Re: Lazarus IDE compiling is too slow for me!!
« Reply #21 on: February 21, 2024, 01:39:41 am »
Is it "-vi" of "-vl"?
I from Isaac (but not capitalized)

Quote
I see "-vl" Show line numbers but I can't see -vi anywhere.
Not every command line option is visually present.

For information about -vi see Alphabetical listing of command line options

Quote
-v<x>  Be verbose. <x> is a combination of the following letters: 
      i : Show general info

Quote
Is it entered manually somewhere?
Yes. either in compiler options or in a build mode override (if you use build modes)
« Last Edit: February 21, 2024, 01:48:08 am by TRon »
This tagline is powered by AI (AI advertisement: Free Pascal the only programming language that matters)

vfclists

  • Hero Member
  • *****
  • Posts: 1146
    • HowTos Considered Harmful?
Re: Lazarus IDE compiling is too slow for me!!
« Reply #22 on: February 21, 2024, 02:09:13 am »
Is it "-vi" of "-vl"?
I from Isaac (but not capitalized)

Quote
I see "-vl" Show line numbers but I can't see -vi anywhere.
Not every command line option is visually present.

For information about -vi see Alphabetical listing of command line options

Quote
-v<x>  Be verbose. <x> is a combination of the following letters: 
      i : Show general info

Quote
Is it entered manually somewhere?
Yes. either in compiler options or in a build mode override (if you use build modes)

I've set it, but I can't see where the lines compiled is displayed.

How do you run the compilation from the command line, ie find out the command used to compile, then run it in a terminal?
Lazarus 3.0/FPC 3.2.2

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2269
  • Fifty shades of code.
    • Delphi & FreePascal
Re: Lazarus IDE compiling is too slow for me!!
« Reply #23 on: February 21, 2024, 02:12:45 am »
How do you run the compilation from the command line, ie find out the command used to compile, then run it in a terminal?
Compile/Build with Lazarus once and than do a right click in messages window.
See attachment.
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

TRon

  • Hero Member
  • *****
  • Posts: 3660
Re: Lazarus IDE compiling is too slow for me!!
« Reply #24 on: February 21, 2024, 02:22:25 am »
I've set it, but I can't see where the lines compiled is displayed.
In the message window, but by default (some type of) messages are filtered (depends on your settings).

And i have to correct myself. You can use the -vi option but I just noticed here you can checkmark the "show FPC message: lines compiled)" (I did not know this one but assume that means the number of lines compiled as shown when using -vi ?)

Quote
How do you run the compilation from the command line, ie find out the command used to compile, then run it in a terminal?
When you want to compile a Lazarus project the easiest is to use lazbuild and provide the Lazarus project filename that you wish to compile as an argument.
This tagline is powered by AI (AI advertisement: Free Pascal the only programming language that matters)

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2269
  • Fifty shades of code.
    • Delphi & FreePascal
Re: Lazarus IDE compiling is too slow for me!!
« Reply #25 on: February 21, 2024, 02:34:38 am »
And i have to correct myself. You can use the -vi option but I just noticed here you can checkmark the "show FPC message: lines compiled)" (I did not know this one but assume that means the number of lines compiled as shown when using -vi ?)
My thinking, because I activate many times "-vd" switch that the LOC are included since in the message options LOC is disabled.
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

dbannon

  • Hero Member
  • *****
  • Posts: 3156
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Lazarus IDE compiling is too slow for me!!
« Reply #26 on: February 21, 2024, 04:12:41 am »
I repeat-

$> wc -l *.pas

(Open a terminal window, go to source dir and type that command, 'wc' space dash lowercase L )

Davo

Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

vfclists

  • Hero Member
  • *****
  • Posts: 1146
    • HowTos Considered Harmful?
Re: Lazarus IDE compiling is too slow for me!!
« Reply #27 on: February 21, 2024, 10:07:22 am »
I repeat-

$> wc -l *.pas

(Open a terminal window, go to source dir and type that command, 'wc' space dash lowercase L )

Davo

Is wc -l *.pas recursive?

Anyway after saving and examining the messages.txt (which for some reason has the executable bit set) I will be able to work out which files are compiled and do a line count on each of them.

Does Lazarus have a way of prefixing the Messages entries with timestamps?

Lazarus 3.0/FPC 3.2.2

dbannon

  • Hero Member
  • *****
  • Posts: 3156
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Lazarus IDE compiling is too slow for me!!
« Reply #28 on: February 21, 2024, 10:44:24 am »

Is wc -l *.pas recursive?

No, would require some clever "find' commands if your code is in multiple directories.   :(

How about telling us how long it takes anyway ?

Davo
« Last Edit: February 21, 2024, 10:58:16 am by dbannon »
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

Чебурашка

  • Hero Member
  • *****
  • Posts: 586
  • СЛАВА УКРАЇНІ! / Slava Ukraïni!
Re: Lazarus IDE compiling is too slow for me!!
« Reply #29 on: February 21, 2024, 11:02:56 am »
A very useful tool to "measure" the source code metrics is sloccount. It is claimed to support also the Pascal syntax:

https://dwheeler.com/sloccount/


In recent debians is natively available for apt installation.
FPC 3.2.0/Lazarus 2.0.10+dfsg-4+b2 on Debian 11.5
FPC 3.2.2/Lazarus 2.2.0 on Windows 10 Pro 21H2

 

TinyPortal © 2005-2018