Recent

Author Topic: [Solved] Compilation Time  (Read 753 times)

loaded

  • Hero Member
  • *****
  • Posts: 825
[Solved] Compilation Time
« on: January 23, 2021, 01:31:42 pm »
Hi All,
When we run the project with F9-Run, can we see the related compilation time in milliseconds in the messages section ?
« Last Edit: January 23, 2021, 03:07:56 pm by loaded »
Check out  loaded on Strava
https://www.strava.com/athletes/109391137

jamie

  • Hero Member
  • *****
  • Posts: 6133
Re: Compilation Time
« Reply #1 on: January 23, 2021, 02:04:28 pm »
And so what's the issue ?

F9 is recompiling before executing.
The only true wisdom is knowing you know nothing

loaded

  • Hero Member
  • *****
  • Posts: 825
Re: Compilation Time
« Reply #2 on: January 23, 2021, 02:12:43 pm »
jamie, actually it's okay;
I wondered how the operating system I use, the disk type SSDs, and the different project options on different computers will affect the compilation and running speed of the program.
Check out  loaded on Strava
https://www.strava.com/athletes/109391137

MarkMLl

  • Hero Member
  • *****
  • Posts: 6686
Re: Compilation Time
« Reply #3 on: January 23, 2021, 02:25:56 pm »
I think it's a fair question, but I suggest that it would be better considered in the context of the FPC compiler. If that starts to emit timing information then the Lazarus IDE could be tweaked to display it.

Once it's looked at as an FPC problem... you don't say what OS you habitually run, but if it were a derivative of unix I'd expect the  time  command to be available.

I habitually append the time (rather than elapsed time) of my compilations to the output, since I'm approaching "silly old fool" stage and appreciate the reminder that I did in fact rebuild 30 seconds ago so I don't need to do so again; that can be done using Project Options -> Compiler Commands -> Execute After.

I don't know whether you could put something to generated elapsed timed in Tools -> Options -> Compiler executable, but I think you've just volunteered to experiment :-)

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9874
  • Debugger - SynEdit - and more
    • wiki
Re: Compilation Time
« Reply #4 on: January 23, 2021, 02:32:57 pm »
When we run the project with F9-Run, can we see the related compilation time in milliseconds in the messages section ?

Tools > Options > Environment > Messages Window: "Show FPC message lines compiled"
This includes the time, but not in millisecs, just 1 decimal after the seconds.

You can build the IDE with console.
- On Linux that is default, just start the IDE from a terminal.
- On Window: -WC
The output on the console: " compiler time in s: 4.855000320822"
(Note the console time may be bigger, as it includes launching fpc, and maybe other work)


For smaller projects there aren't too many options to speed up.
Obviously:
- disk speed.
- CPU: IPC for single core.

If you only compile the project, then there is little use of multicore. The IDE while waiting for fpc may use a diff core, but that makes no big diff.

If you have many packages, and the packages do NOT depend on each other, then packages can be compiled in parallel.
That is for example noticeable when you compile the IDE. (You can limit the threads in the options and compare)
« Last Edit: January 23, 2021, 02:36:02 pm by Martin_fr »

loaded

  • Hero Member
  • *****
  • Posts: 825
Re: Compilation Time
« Reply #5 on: January 23, 2021, 03:07:42 pm »
I am grateful to MarkMLl and Martin_fr for your answers.
Tools > Options > Environment > Messages Window: "Show FPC message lines compiled"
Your answer was what I was looking for.
Check out  loaded on Strava
https://www.strava.com/athletes/109391137

 

TinyPortal © 2005-2018