Recent

Author Topic: Slow compiling with lazarus 2.0 on Raspbian  (Read 2290 times)

thecake

  • Newbie
  • Posts: 2
Slow compiling with lazarus 2.0 on Raspbian
« on: February 15, 2020, 07:48:34 pm »
Hi,

I have installed Lazarus 2.0.0 on a raspberry pi 3b+ (O.S : raspbian Buster).
It's working fine BUT the compiling process take too long (> 30 seconds for a small project) and i feel that, even if the hardware is a raspberry pi 3b+, it's not normal.

How to solve this issue please ?

Thanks  :)

af0815

  • Hero Member
  • *****
  • Posts: 1288
Re: Slow compiling with lazarus 2.0 on Raspbian
« Reply #1 on: February 15, 2020, 09:28:07 pm »
can you look if something goes wrong with the memory and linux is starting swapping ? I take Lazarus fixes 20 with fpc fixes32 on the Raspi 3B+ with buster and it is working. Starting of a programm with debuging is not realy fast but this expected.
regards
Andreas

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: Slow compiling with lazarus 2.0 on Raspbian
« Reply #2 on: February 15, 2020, 10:39:09 pm »
Buy faster SD card
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11382
  • FPC developer.
Re: Slow compiling with lazarus 2.0 on Raspbian
« Reply #3 on: February 15, 2020, 10:40:17 pm »
Did somebody already measure the difference between RPI4+SD vs RPI4+USB3 SSD?

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: Slow compiling with lazarus 2.0 on Raspbian
« Reply #4 on: February 16, 2020, 06:38:44 pm »
Did somebody already measure the difference between RPI4+SD vs RPI4+USB3 SSD?
You are lucky. I have seen this just yesterday:
https://www.youtube.com/watch?v=gp6XW-fGVjo
Difference is big.
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

winni

  • Hero Member
  • *****
  • Posts: 3197
Re: Slow compiling with lazarus 2.0 on Raspbian
« Reply #5 on: February 16, 2020, 07:11:53 pm »
Hi!

avras youtube link says:
Code: Text  [Select][+][-]
  1. An error occurred. Please try again later. (Playback ID: qpoGMy4Hy1jT5Y7h)
  2. Learn More

Winni

dsiders

  • Hero Member
  • *****
  • Posts: 1052
Re: Slow compiling with lazarus 2.0 on Raspbian
« Reply #6 on: February 16, 2020, 08:19:03 pm »
Hi!

avras youtube link says:
Code: Text  [Select][+][-]
  1. An error occurred. Please try again later. (Playback ID: qpoGMy4Hy1jT5Y7h)
  2. Learn More

Winni

I just watched it with no issue.
Preview Lazarus 3.99 documentation at: https://dsiders.gitlab.io/lazdocsnext

thecake

  • Newbie
  • Posts: 2
Re: Slow compiling with lazarus 2.0 on Raspbian
« Reply #7 on: February 16, 2020, 09:11:35 pm »
Buy faster SD card
I use a class 10 SDHC1...

winni

  • Hero Member
  • *****
  • Posts: 3197
Re: Slow compiling with lazarus 2.0 on Raspbian
« Reply #8 on: February 16, 2020, 09:16:03 pm »
No - it was the youtube server.

Too small.

Now I've got it.

Winni

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: Slow compiling with lazarus 2.0 on Raspbian
« Reply #9 on: February 17, 2020, 02:53:13 am »
Buy faster SD card
I use a class 10 SDHC1...
Well, my SanDisk SDHC is 3x slower then my Samsung Evo Plus SDXC. Anyway, if you press Ctrl+F9 two times in a row, do you get 30 seconds for each attempt? Or do you calculate here some CleanUp+RebuildAll? Is Lazarus the only application running? How much free memory you have? What is your swap size?

Buying 4GB Pi4 would also speed up compilation a lot. Project compilation with 1GB RAM will be slow and full of swapping even in Windows x86.
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

Thaddy

  • Hero Member
  • *****
  • Posts: 14197
  • Probably until I exterminate Putin.
Re: Slow compiling with lazarus 2.0 on Raspbian
« Reply #10 on: February 17, 2020, 10:02:05 am »
The RPi3 B+ is not slow at all, but it needs:
a) a swap of 1 GB
b) a SDHC cat 10 card or even an SSD. (There is a *much* better explanation on how to do that on the Raspberry Pi website, the sd card is just boot)

Note the RPi 4 does not need the sd card for boot when using a SSD.
 
Specialize a type, not a var.

hansotten

  • Jr. Member
  • **
  • Posts: 88
Re: Slow compiling with lazarus 2.0 on Raspbian
« Reply #11 on: February 17, 2020, 11:14:16 am »

Note the RPi 4 does not need the sd card for boot when using a SSD.
You mean the RPi 3?

USB Boot is not ready for Pi 4, but you can bootstrap via an  SD card.
https://jamesachambers.com/raspberry-pi-4-usb-boot-config-guide-for-ssd-flash-drives/ is a good guide.

Thaddy

  • Hero Member
  • *****
  • Posts: 14197
  • Probably until I exterminate Putin.
Re: Slow compiling with lazarus 2.0 on Raspbian
« Reply #12 on: February 17, 2020, 11:57:32 am »
No, RPi4 too. All updates, but still a slowdown since the disk is connected with USB2, not USB3. That gives you still a significant speed-up against most SD cards.
Specialize a type, not a var.

hansotten

  • Jr. Member
  • **
  • Posts: 88
Re: Slow compiling with lazarus 2.0 on Raspbian
« Reply #13 on: February 19, 2020, 07:00:39 pm »
No, RPi4 too. All updates, but still a slowdown since the disk is connected with USB2, not USB3. That gives you still a significant speed-up against most SD cards.

Can you explain how you do that? The official support for SD less  USB booting is not there yet fo RPI 4  and may take long before it will be good enough. On a RPI3 it works most of the time ...

Never seen how a RPI4 can boot from disk without and SD card (netboot is the only beta method known).
I only know of the bootcode.bin on SD card or a bootable SD card that has fstab point to an USB drive methods as documented in the link I gave.

 

TinyPortal © 2005-2018