[sldev] Is there a way to compile the viewer faster?

Dzonatas dzonatas at dzonux.net
Wed Mar 14 01:47:07 PDT 2007


Callum Lerwick wrote:
> I have ccache integrated into my customized 'mock' build system. And am
> working on setting up distcc.
>
> But that's just a band-aid over the real problem. Maybe its just gcc,
> but as a friend put it, "SL requires more memory to compile than some
> small countries". (He's on OSX, I'm on Linux) It took me *hours* to
> compile with "only" 1gb RAM, because it was *swapping*. I upped my
> machine to 2gb, it still swaps a bit but its a lot faster. It seems to
> be specific source files that eat gobs of RAM. I need to figure out how
> to instrument the build system to log how much RAM each source file
> takes up while compiling... (Dear lord WTF is this
> llviewerprecompiledheaders.h thing and why do I get the feeling its
> causing more harm than good...)
>
> I never noticed linking to be near as much a problem, personally.
>   
DISTCC is not a big deal unless you have a nice shared resource with 
ccache. NFS is reported to slow down DISTCC+CCACHE.

I've run coLinux on my front-end system. Without DISTCC, it will compile 
the entire SL under 400Mibs. I also added a patch:

https://jira.secondlife.com/browse/VWR-225

Before this patch, it would demand up to 1.5 gigs worth of memory/swap 
resources. After the patch, the swap space was not even hit.

Under 5 mins to rebuild the entire source on a single core system that 
runs Windows and Linux in parallel is pretty freaking good!

SConstruct is not setup to pre-compile llviewerprecompiledheaders.h.  I 
planned to submit another patch to do that. For now, it looks just like 
any other header.

=)


More information about the SLDev mailing list