Le Thu, Nov 09, 2023 at 05:54:33PM +0100, Caspar Schutijser a écrit :
> Hi all,
> 
> Below is a diff for bsd.port.mk that allows us to set USE_SCCACHE=Yes
> in /etc/mk.conf to use sccache. Manual page updates are included,
> which I copied and adapted from the ccache bits.
> 
> Note that with the diff below, sccache is only used for Rust code,
> not for C/C++ (which sccache also supports). So at least at this
> moment, USE_CCACHE=Yes and USE_SCCACHE=Yes don't bite each other
> (ccache will cache C/C++ compilation results, sccache will cache
> Rust compilation results). This may change later if we want to use
> sccache for C/C++ too, which at the moment does not work yet.
> 
> Another thing to note is that sccache uses a client-server model;
> quote from the README:
> 
> > sccache works using a client-server model, where the server runs
> > locally on the same machine as the client. The client-server model
> > allows the server to be more efficient by keeping some state in
> > memory. The sccache command will spawn a server process if one is
> > not already running, or you can run sccache --start-server to start
> > the background server process without performing any compilation.
> > 
> > You can run sccache --stop-server to terminate the server. It will
> > also terminate after (by default) 10 minutes of inactivity.
> 
> So don't be surprised if a sccache process is still running when
> you hit ^C on the compilation process.
> 
> I have used this now for quite some time and I didn't find any
> problems so far. Comments or OKs?

definitely OK, some numbers from compiling (coming from cargo itself):
sysutils/eza:
- without cache 3m 53s
- rebuild with cache populated 1m 15s

devel/sccache itself:
- without cache 29m 36s
- rebuild with cache popuplated 4m 48s

currently populating the cache for www/mozilla-firefox to see how much
we gain..

Landry

Reply via email to