AArch64. Slow program start lazarus / 1-Linux ---------------------------------------------------------------------- LemonParty · 2025-11-10 15:46 I have a Raspberry 5 with Debian on it. And my simple program that uses SQLite loads 5+ seconds. The same program on Windows starts allmost immediately. Also Lazarus on this system also loads 5+ seconds. Is there a reason why it is so slow? ---------------------------------------------------------------------- Thaddy · 2025-11-11 10:09 How do you run Debian on the Raspberry Pi 5? If you run from an SD card, what type? It looks like storage speed issue. You can run the OS from a SSD, did you know that? But, don't expect to run as fast as a Windows PC running on a, e.g. Ryzen 7 16 core with a superfast M2-SSD.(My laptop) That is not what a RPi 5 is for. ---------------------------------------------------------------------- dbannon · 2025-11-11 11:02 Yes , as Thaddy says, the SDCardis simply not suitable. Even a newish USB diskkey (ie thumbdrive) will do a better job, boot (if you like) on the SDCard but mount and install and external and install the big apps AND the swap file there. Davo ---------------------------------------------------------------------- LemonParty · 2025-11-11 11:10 Probably this is a SD card speed issue. I tested the speed of SD card and it is 20 mb/s. But when I run a default file manager it stats immediately. ---------------------------------------------------------------------- Thaddy · 2025-11-11 15:00 A file manager is way lighter than the behemoth full Lazarus install. What you can do is limit the number of components to the ones you really need. But that is not necessary when you run from a more expensive SDSX card or a good USB3 stick or best an SSD. Some more expensive cards and most newer USB3 sticks have throughput for read of well over 100Mb/sec. That is also the minimum recommended read speed. (Write speed is less essential) SSD can reach a manyfold of that, way above 500Mb/sec. A good 64 GB USB3 stick costs under 7 euro here, with 128GB at 12 euro. A fast SD card is around 20 euro for 128GB. An external 512GB - 1TB SSD comes in at around 50 euro or less and is recommended. The Raspberri Pi 5 supports booting from SSD directly. (4 too, 3 and earlier need SD bootstrap) Look for an SSD with its own external powersupply! if you plan to do extensive work on your Pi5. (overheating can be a problem) I bought a separate housing and an internal m2-SSD to fit in it. ---------------------------------------------------------------------- paweld · 2025-11-12 06:23 In my opinion, the cause may be Wayland—try switching to X11. When I was playing around with RPi recently, it was the reason for the long startup time of Lazarus and the programs compiled in it. ---------------------------------------------------------------------- Thaddy · 2025-11-12 09:47 Can you elaborate on that? Because Wayland has many issues, but not startup time. (And I have lot's of Pi's) SD cards have many issues... TIP: On RPi's, use Qt (3,5,+), not GTK2,  as widgetset. That removes a lot of the Wayland problems for Lazarus, because Qt is way ahead on Wayland. But does not affect load times. ---------------------------------------------------------------------- dbannon · 2025-11-12 10:20 I think we are searching too deeply here. Loading Lazarus from a SDCard is expected to be slow. Its a RasPI5 but how much memory ?  RasPi OS has a very poor swap install by default, too small and controlled by some gee wizz (but unfamiliar to me) dphys-swapfile. If you go into swap, and the swap file is on the SDCard, 5 seconds is pretty good IMHO. Move swapfile, big applications, multifile libraries and databases onto a better disk. Davo ---------------------------------------------------------------------- ALLIGATOR · 2025-11-12 10:26 Maybe you just need to use a profiler? perf + https://github.com/KDAB/hotspot ---------------------------------------------------------------------- paweld · 2025-11-12 10:31 QuoteCan you elaborate on that? Because Wayland has many issues, but not startup time.i.e. https://forum.lazarus.freepascal.org/index.php/topic,65377.0.html ---------------------------------------------------------------------- Thaddy · 2025-11-12 10:48 Quote from: paweld on November 12, 2025, 11:31:12 amQuoteCan you elaborate on that? Because Wayland has many issues, but not startup time.i.e. https://forum.lazarus.freepascal.org/index.php/topic,65377.0.html I don't get it. I have almost all RPi's running (except 2), yes, also a RPi1. ALL of them run a FPC compiler. Most of them also run Lazarus, with a swap partition and that even includes the RPi one.(ELEVEN YEARS OLD) I really don't get it. Yes, AARCH64 caused some problems but all of these are solved a long time ago. Wayland caused more problems. It is not the compiler, but Lazarus compiled for GTK2 is the problem on AARCH64, IOW GTK2 as default. Simply use Qt5 for AARCH64 and Lazarus. ---------------------------------------------------------------------- paweld · 2025-11-12 10:57 I only have statements from rpi 3, 4, and 5, and since Wayland was enabled by default, it always caused problems. After switching to X11, everything is fine. I used gtk2 on each of them. ---------------------------------------------------------------------- Thaddy · 2025-11-12 10:58 Yes, that is the known solution, but is it the right one? GTK2 is abandonware. Lazarus has sane alternatives, but sticks to... well, GTK2....as default (which isn't a default in general current Linux distributions) That is beyond me. (Flame is already off here..) Has nothing to do with Raspberry Pi. ---------------------------------------------------------------------- paweld · 2025-11-12 11:28 Quote from: ThaddyYes, that is the known solution, but is it the right one? GTK2 is abandonware. Perhaps, but it works OOTB on every Linux distribution (that I have encountered), and does not require additional dependencies as in the case of QT. QuoteHas nothing to do with Raspberry Pi.If disabling Wayland in favor of X11 solves the problem, then it is related with RPi. ---------------------------------------------------------------------- Thaddy · 2025-11-12 11:34 No, I have the same with recent Debians which default to Wayland ---> Means that ALL other Debian derivatives, including Ubuntu have the same issues. You need to INSTALL X11, or xwayland  to  some extend. Sleep well. (This is a subject that can be solved for Lazarus if it would use Qt as default) ---------------------------------------------------------------------- paweld · 2025-11-12 11:45 Quote from: Thaddy(This is a subject that can be solved for Lazarus if it would use Qt as default) You can also disable Wayland - that solves the problem too. The good thing is that everyone can solve it in whatever way is most convenient for them. ---------------------------------------------------------------------- Thaddy · 2025-11-12 12:27 As of know I wish you good luck again. I run several Archaeopteris as a free choice. It is not to make something run, it is about installing legacy systems to make it run. It is like having FreeDos to run TurboPascal. Then again, I do the same.....but only if I need to. It is also not about Linux, but "merely" the window compositor. And GTK2 will bite everyone at some point. ---------------------------------------------------------------------- dbannon · 2025-11-12 23:14 While I agree that gtk2 is past its "use by date", thats only because replacements exist, there is nothing wrong with gtk2 in and of itself. My app is shipped via Debian as a Qt5, users do not have a choice, I personally prefer Qt5 too. But I also distribute pre made packages via github.   And users there choose gtk2, three times more downloads than Qt5. (Interestingly, rpm users seem to prefer Qt6 over Qt5.) Davo