64-bit Linux compilation time

Hi to ALL!
Trying to compile a medium source code app in a fresh UBUNTU 16.10 with Xojo2016R1.1 to create a 64bits executable, its take A LOOOOOOOOOOOONg time to compile (20 minutes). This time is not valid for development process so my question is, do you know how to speed it? Are you having the same issue (compilation time to 64 bits binary)?

Thanks

64 bit compile use the LLVM compiler which does a LOT more optimization than the old 32 bit compiler
Short of having lots of memory & maybe an SSD there’s likely not much else you can do to speed things up

Are you sure about this? 16.10 is not scheduled for release until October 2016.

Uh oh - old guy reminiscing time …

Any time I get frustrated by modern compile times, I run a compile of our SunOS 4.15 build (still used in government and research environments in embedded test equipment systems). Try building 240K lines of C code on a 128MHz, single core, SPARC RISC processor with 256MB of RAM and a 2GB, 128ms disk …

Heck, there was a time back in the 90’s when an AMD 368/387 40MHz system with 4MB of RAM was a high-end build platform running SCO XENIX. We could start a build, go see a movie and eat, and get back to the office just as the build was finishing.

I recall having an old system to build that we literally started at quitting time & hopefully it was done by morning
It usually took about 12-14 hours to build

[quote=274182:@Jose Navarro]Hi to ALL!
Trying to compile a medium source code app in a fresh UBUNTU 16.10 with Xojo2016R1.1 to create a 64bits executable, its take A LOOOOOOOOOOOONg time to compile (20 minutes). This time is not valid for development process so my question is, do you know how to speed it? Are you having the same issue (compilation time to 64 bits binary)?

Thanks[/quote]

64 bit builds, because they use a different compiler, will take longer.
I’d test basic logic in 32 bit and do occasional builds of the 64 bit version so you still have reasonable turn around time for debugging and then have 64 bit versions to verify that 32 and 64 bit behave the same.

If that’s not practical - have patience.
They just DO take longer.
And this isn’t Linux specific - ALL platforms 64 bit builds take longer than 32 bit builds.

And before anyone submits a feature request to use the old compiler for 64 bit because its fast - dont

There is a request for having settable optimization levels and that could potentially impact compile times
If there were a set like “none”, “low”, “medium”, “high” (what this turns out to be remains to be determined as its JUST a request at this point)
None might do no optimizations at all and so be really quick
High might do a ton of optimizations so be a lot slower

But, its not implemented so at present there isn’t a lot you can do to influence how long builds take beyond having a fast disk & adequate memory so the OS doesn’t have to page swap to virtual memory

Compiling for ARM for the same reason takes very long too. Plus given the fact that we lack a remote debugging facility until now, makes it really a tough job to get a serious project set up on the PI within a reasonable schedule.

The debugging issue is not peculiar to ARM - its for just about anything compiled with LLVM
This IS something being actively worked on

I haven’t done benchmarking with compile times, but the Unity interface was a lot slower than other desktops: GNOME, KDE, MATE, and Xfce. I was benchmarking startup times, and some Xojo IDE items and this was before Ubuntu 16.04.

I got a lot of time consuming compilation 64 bits apps but now I have speed up the compilation time about 1000x!!! I want to share with you the 2 tweaks:

This is only valid for high RAM (8 GB in my PC)
Ubuntu 16.04:

-Moving Temporary Files to Memory (RAM):

Before starting this process it’s a good idea to backup the fstab file:

sudo cp /etc/fstab /etc/fstab.bak

The next step is to edit fstab:

sudo gedit /etc/fstab

Add the following lines at the end of the file :

tmpfs /tmp tmpfs defaults,noatime,size=1G,mode=1777 0 0
tmpfs /var/tmp tmpfs defaults,noatime,mode=1777 0 0
tmpfs /var/log tmpfs defaults,noatime,mode=0755 0 0
tmpfs /var/log/apt tmpfs defaults,noatime 0 0

Other tweak:
The swappiness value determines how much data is written to the virtual memory on the hard disk drive, which can slow your system down. Begin by opening a Terminal and entering:

cat /proc/sys/vm/swappiness

The default swappiness value in Ubuntu is 60.

Next, open the /etc/sysctl.conf file in a text editor:

gedit /etc/sysctl.conf

Scroll to the bottom and add the following parameter (and the associated note as a reminder):

Decrease swappiness value

vm.swappiness=2

With this done, save the file. Unusually for Linux, you’ll also need to restart the computer. Once booted up again, confirm the swappiness value has changed.

Now compilation time is instant for me!!!

@Jose Navarro - That is the sign of a true Unix-head!