Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
cycletronic
Posts: 113
Registered: ‎03-23-2011
My Device: Playbook, Z10

Compiling with distcc?

Because I'm working with an older machine, and my code base is getting larger, I have 20 minute compile times when I have to do a full recompile.  Due to this, I'm motivated to look for ways to speed this up, short of buying a new rig.  I'm on linux.

 

Has anyone used distcc before?  I've heard and read about it, but never used it.  I do have access to a server that I might be able to use with distcc, but I don't even know if it's possible to compile for QNX using distcc.  Anyone here have experience in that area?

----------------
WIP game: Melodaeum
My graphically bland but very useful Morse Code trainer: Speed CW
My graphically attractive but boring game: The Rainstorm
BlackBerry Development Advisor (Retired)
smacmartin
Posts: 499
Registered: ‎05-07-2012
My Device: developer

Re: Compiling with distcc?

[ Edited ]

20 minute compile times is unreasonable but I have seen it on some other completely unrelated projects.

For C++, here are the usual suspects:

 

- running on a heavily loaded machine

- paging: the compiler is constantly swapping

- files across the network.  Sometimes there is slow file transfer between machines.

- failing disk drive

- cascaded includes: everything includes everything (unnecessary #includes in .h files).   This is less an issue nowadays, but cause slow incremental builds and can exacerbate the previous issues
- especially #include <Qt> everywhere or other big include-everything libraries

 

I have not looked into precompiled headers recently but used that trick in the past

 

Stuart

BlackBerry Development Advisor (Retired)
smacmartin
Posts: 499
Registered: ‎05-07-2012
My Device: developer

Re: Compiling with distcc?

Also:

- including 3rd party libraries in the project as cpp files to be compiled instead of as libraries that are built only occasionally

 

Stuart

Developer
cycletronic
Posts: 113
Registered: ‎03-23-2011
My Device: Playbook, Z10

Re: Compiling with distcc?

In my case I know it's because my machine is outdated... single-core processor, 2GB ram, etc.  And it's a large code base (cocos2dx).  I'm not griping that it's slow, the best solution is probably to upgrade the machine, but it's not practical for me right now to do so.  I know that another solution is distcc... a tool that allows you to cluster multiple machines together to speed up compiling.  

 

So I'm asking specifically about distcc.  Is there any reason distcc won't work with the Native SDK for Playbook?

----------------
WIP game: Melodaeum
My graphically bland but very useful Morse Code trainer: Speed CW
My graphically attractive but boring game: The Rainstorm
BlackBerry Development Advisor (Retired)
smacmartin
Posts: 499
Registered: ‎05-07-2012
My Device: developer

Re: Compiling with distcc?

Why don't you try it?

This might be related: http://lists.trolltech.com/qt-interest/2008-11/thread00348-0.html

 

Stuart

Developer
cycletronic
Posts: 113
Registered: ‎03-23-2011
My Device: Playbook, Z10

Re: Compiling with distcc?

I haven't tried it because I'd rather develop my game than fiddle :smileyhappy:  And it takes a fair bit of work to set up.  I'd like to know first if it's impossible before I invest a lot of time in it.  I'm mostly curious if someone else has done it.  I may get around to trying it eventually.

 

Thank you for looking into it and responding.  One thing I learned in the thread you link to is there's another distributed compiling tool called icecream that I may need to look into.

----------------
WIP game: Melodaeum
My graphically bland but very useful Morse Code trainer: Speed CW
My graphically attractive but boring game: The Rainstorm