* * *

Author Topic: Total build time  (Read 5119 times)

ertank

  • Full Member
  • ***
  • Posts: 201
Total build time
« on: November 02, 2017, 11:59:15 am »
Hello,

I am currently on Lazarus 1.8.0RC5.

I know that total build time is in verbose messages. If you are working on a slow system like Raspberry Pi you do really wonder (I mean it because it sometimes takes more than the time I prepare myself a filtered coffee) how long it took and how many lines compiled in total (as if in Delphi build screen).

Is there a way to see both after build finishes? I mean without any need to see all these verbose messages, only these two information?

Thanks.

Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 798
    • Burdjia
Re: Total build time
« Reply #1 on: November 04, 2017, 11:49:25 am »
I was about to suggest to pass some command line options to the compiler but I can't find any one that would help you except "-vs" (shows time stamps).  %)
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

Leledumbo

  • Hero Member
  • *****
  • Posts: 7928
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Total build time
« Reply #2 on: November 04, 2017, 12:28:54 pm »
There used to be "show compile dialog" in environment options. I can't find it anymore, though (I don't need it anyway so I turned it off last time I can still find it).

ertank

  • Full Member
  • ***
  • Posts: 201
Re: Total build time
« Reply #3 on: November 04, 2017, 03:58:36 pm »
I fail to find a method other than using verbose listing in messages.

Thaddy

  • Hero Member
  • *****
  • Posts: 6364
Re: Total build time
« Reply #4 on: November 04, 2017, 05:06:49 pm »
If you are working on a slow system like Raspberry Pi
Which RaspberryPi? 1? maybe, 3? not an issue.....On an RPi3.
« Last Edit: November 04, 2017, 05:28:45 pm by Thaddy »
I am enjoining wine, not whine....

ertank

  • Full Member
  • ***
  • Posts: 201
Re: Total build time
« Reply #5 on: November 04, 2017, 05:43:22 pm »
Which RaspberryPi? 1? maybe, 3? not an issue.....On an RPi3.
It is Raspberry Pi 3 and it is an issue. Building takes about 2 minutes on average. It may not be CPU but microsd card. I am trying fast USB (directly booting and using). Seems better. Still building takes time.

valdir.marcos

  • Sr. Member
  • ****
  • Posts: 397
Re: Total build time
« Reply #6 on: November 04, 2017, 06:12:39 pm »
It is Raspberry Pi 3 and it is an issue. Building takes about 2 minutes on average. It may not be CPU but microsd card. I am trying fast USB (directly booting and using). Seems better. Still building takes time.

I do not use ARM to program, but SD cards and Micro SD cards have different brands, models, prices and useful lives.
May you try other Micro SD cards?
https://www.howtogeek.com/189897/how-to-buy-an-sd-card-speed-classes-sizes-and-capacities-explained/
https://www.kingston.com/us/flash/sd_cards

ertank

  • Full Member
  • ***
  • Posts: 201
Re: Total build time
« Reply #7 on: November 04, 2017, 06:38:56 pm »
I do not use ARM to program, but SD cards and Micro SD cards have different brands, models, prices and useful lives.
May you try other Micro SD cards?
https://www.howtogeek.com/189897/how-to-buy-an-sd-card-speed-classes-sizes-and-capacities-explained/
https://www.kingston.com/us/flash/sd_cards
Sd card I am using is Class 10 Samsung EVO+ 32GB I especially selected that card at the time I  was searching one. It was among the best when I placed my order in the past. However, sdcard speeds are about 4-8MB/second on average. Now I am testing Sandisk Extreme 64GB USB3.1 USB memory stick (thanks to RPi3 it has USB boot support). I get about 25MB/second sequential write speeds on this one. Nearly SSD speeds on an USB stick and for less amount of money.

Still, OS is using 4k blocks and writing 4k blocks in the background most of the time (log writes, database writes, etc). Raspberry Pi I/O is shared by cable ethernet, USB ports and sdcard if I am not mistaken. Real world speeds are dropping on regular use. Think about adding Lazarus builds on top of this.

Project I am working is a long term. I have built that project nearly 600 times now. Having build time visible on the screen will give me a brief idea about how much time I keep waiting on builds. Besides, it is a nice piece of information to have anyway.

P.S. I believe it was this web page I used to select my sd card. I got 4.5mb/sec on sequential writes (dd) web page on the other hand displays 14mb/sec
https://www.jeffgeerling.com/blogs/jeff-geerling/raspberry-pi-microsd-card
« Last Edit: November 04, 2017, 06:42:22 pm by ertank »

Thaddy

  • Hero Member
  • *****
  • Posts: 6364
Re: Total build time
« Reply #8 on: November 04, 2017, 06:53:02 pm »
Which RaspberryPi? 1? maybe, 3? not an issue.....On an RPi3.
It is Raspberry Pi 3 and it is an issue. Building takes about 2 minutes on average. It may not be CPU but microsd card. I am trying fast USB (directly booting and using). Seems better. Still building takes time.
The class of SD card does not matter too much.
Lazarus itself build takes 2 minutes indeed (but also on my daughters Intel 64 laptops)
FPC takes closer to 5-7 minutes on a RPi3/Raspbian Jessie. Also note that Raspbian is much, much faster than any other distribution.

What you can do is create a swap file of 1 Gig. That helps.
Both are very complex programs, so that is to be expected.
If your own programs take longer than seconds there is indeed something wrong.

How long takes a Lazarus rebuild on yours?

Best way to time is actually do a build from the command line and write a little shellscript...
That way you exclude Lazarus overhead.
« Last Edit: November 04, 2017, 07:03:50 pm by Thaddy »
I am enjoining wine, not whine....

GetMem

  • Hero Member
  • *****
  • Posts: 3083
Re: Total build time
« Reply #9 on: November 04, 2017, 07:09:44 pm »
@ertank
Why don't you debug the IDE and find out where that specific line is added to the message window? The build progress dialog was removed in Lazarus 1.4, when the compiling process became multi-threaded.

ertank

  • Full Member
  • ***
  • Posts: 201
Re: Total build time
« Reply #10 on: November 04, 2017, 08:21:05 pm »
@ertank
Why don't you debug the IDE and find out where that specific line is added to the message window? The build progress dialog was removed in Lazarus 1.4, when the compiling process became multi-threaded.
Lazarus is about 3.5 million lines of code. Lots of units. I do not know which specific units I should be looking at. I do not know how I can debug it, too. Might give it a shot when I find some time provided some information about units though.

GetMem

  • Hero Member
  • *****
  • Posts: 3083
Re: Total build time
« Reply #11 on: November 04, 2017, 08:24:23 pm »
Quote
Lazarus is about 3.5 million lines of code. Lots of units. I do not know which specific units I should be looking at. I do not know how I can debug it, too. Might give it a shot when I find some time provided some information about units though.
In the mean time I did it for you. It took me five minutes to find the relevant code. Can you apply a patch?

ertank

  • Full Member
  • ***
  • Posts: 201
Re: Total build time
« Reply #12 on: November 04, 2017, 08:29:26 pm »
The class of SD card does not matter too much.
Lazarus itself build takes 2 minutes indeed (but also on my daughters Intel 64 laptops)
FPC takes closer to 5-7 minutes on a RPi3/Raspbian Jessie. Also note that Raspbian is much, much faster than any other distribution.

What you can do is create a swap file of 1 Gig. That helps.
Both are very complex programs, so that is to be expected.
If your own programs take longer than seconds there is indeed something wrong.

How long takes a Lazarus rebuild on yours?

Best way to time is actually do a build from the command line and write a little shellscript...
That way you exclude Lazarus overhead.
My own project takes between 90 seconds - 150 seconds (depending on if I am doing other stuff).

I honestly do not remember how long Lazarus takes to build. Did not measure it. I do not think it is 2 minutes though. A lot more than that.

I keep swap size at 1GB constantly. Maybe slowness is also related with a lot of paging. Did not check this.

Most of the time, I am adding new units and functions which needs testing. So, I use IDE debugging. Might try command line builds. Not sure if I will find them convenient though.

Thanks for suggestions.

Thaddy

  • Hero Member
  • *****
  • Posts: 6364
Re: Total build time
« Reply #13 on: November 04, 2017, 08:31:31 pm »
IDE debugging is for debugging the IDE, not for debugging your program!!!!!....... Maybe that's your problem.... O:-)
I am enjoining wine, not whine....

ertank

  • Full Member
  • ***
  • Posts: 201
Re: Total build time
« Reply #14 on: November 04, 2017, 08:32:00 pm »
In the mean time I did it for you. It took me five minutes to find the relevant code. Can you apply a patch?
I appreciate that.

I can try to apply a patch. I do not know how to make a diff file for patch purposes and do not know svn much. But, I can try to figure.

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus