paru icon indicating copy to clipboard operation
paru copied to clipboard

Speed up build

Open metov opened this issue 3 years ago • 4 comments

It seems like the paru AUR package build slowly. First it has to update the entire crates.io index (about a minute), then apparently it has to build ~270 dependencies (a few minutes), and then finally it builds paru which also takes a long time (several minutes).

Is there some easy way to speed this up?

metov avatar Nov 05 '22 22:11 metov

You can always use the official, prebuilt binary package: paru-bin.

You can also experiment with some compiler options, but I'm afraid they can only do so much. For example, this one disables LTO, use fewer code optimizations and increases build parallelization:

$ export RUSTFLAGS='-C opt-level=1 -C codegen-units=16 -C lto=no'

I'd just use the prebuilt package, though.

guihkx avatar Nov 06 '22 09:11 guihkx

There's an issue about reducing deps. They're all blocked by other things though.

Morganamilo avatar Nov 11 '22 18:11 Morganamilo

@guihkx Thanks for the suggestion -- I suppose just using the binaries is always an option. I was wondering if there's any possibility of improving the root cause though.

@Morganamilo Which issue is that?

metov avatar Nov 11 '22 22:11 metov

https://github.com/Morganamilo/paru/issues/613

Morganamilo avatar Nov 12 '22 11:11 Morganamilo