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

Kelly Washington kelly at lindenlab.com
Tue Mar 13 14:17:41 PDT 2007


Viewer link times are the slowest part of building.  Internally we use
distributed build tools for every platform - Xcode has it built in,
linux has distcc and we use Incredibuild (not free) for windows.  That
doesn't help link times though.  If you build on a mac ZeroLink will
allow you to launch the viewer without linking - I personally don't use
it but I hear others have had success with it.

>From an internal email just the other day:

> Details:
> I decided to try to reduce my link times by throwing hardware at the
> problem.

> C: Western Digital 80 GB 7200 RPM 1.5 Gb SATA disk that came with my
> box.  It has the operating system and compiler installed on it.
> D: Western Digital 120 GB 7200 RPM 1.5 Gb SATA disk I added.
> E: Western Digital 36 GB 10,000 RPM 1.5 Gb SATA disk I added.

> Time to link newview_noopt.exe:
> C: 2'15"
> D: 2'00"
> E: 1'30"

In short, moving to a second disk from the main OS reduced link time by
~12%, moving to a faster drive reduced it about another  21% (~33%
better than when on the primary OS disk.

On the software side cleaning up headers has been proven to reduce link
times.  For example, replacing unnecessary #includes in headers with
declarations (class LLFoo;).  Some of the headers are from cruft and are
no longer needed.  Cleaning these up does reduce link times.

Moving linden libraries to dynamic libs would also greatly reduce link
times - but this is probably not trivial to implement.

If anyone else has tips for reducing compile or link times please do share.

Dale - I would be very interested in any speed tests you could do with
the raid setup and / or the ram disk once you get it working.  :)

 - Kelly

Dale Glass wrote:
> В сообщении от 13 марта 2007 21:46 Tobias Lang написал(a):
>   
>>  Hello,
>>
>> I would be interested how you folks are dealing with the very long
>> compilation time of the SL viewer. I understand that the initial
>> compilation takes 30 min, but the linking process always takes
>> minutes on my P4. How are you guys developing like this? Better
>> machines, very careful programming? Or is there a magic switch?
>>
>> Thanks,
>> Tobias
>>     
>
> Out of curiosity, I did a quick test.
>
> Compilation seems fairly disk intensive, especially linking. Linking 
> takes 1 minute here.
>
> So, you could speed it up by using a RAID (I have a RAID-1), or by 
> building on a RAM disk (which I plan to try as soon as I upgrade my 
> memory).
>
> On Linux, the compilation process seems to create the object files 
> in /tmp. A quick check indicates that there are 330MB of files are 
> created during compilation, so moving that to a ramdisk is possible. 
> But you'd probably need to sync that to disk, as otherwise after 
> rebooting the computer it'd require a full rebuild.
>
>
> For me, this is fairly satisfactory, I generally don't compile that 
> much in a day. Linking doesn't fail very often, as mistakes that 
> cause it to fail are rare, and compilation errors are faster to 
> correct.
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> Click here to unsubscribe or manage your list subscription:
> /index.html
>   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.secondlife.com/pipermail/sldev/attachments/20070313/c6522209/attachment.htm


More information about the SLDev mailing list