[Kicad-developers] Speed up building?

2014-07-25 Thread Mário Luzeiro
Hello,
Is is possible speed up building (in linux) some how? (without to buy a faster 
computer)
It looks it is not building using multiprocessor.

Also, every small change, it will took a lot of time by the linker to do its 
business.
I do believe the only way would be implement dynamic objects or someting but it 
will change drastically the architecture. :/

MRL

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] Speed up building?

2014-07-25 Thread Lorenzo Marcantonio
On Fri, Jul 25, 2014 at 08:59:23AM +, Mário Luzeiro wrote:
 Hello,
 Is is possible speed up building (in linux) some how? (without to buy a 
 faster computer)
 It looks it is not building using multiprocessor.

make -j4 helps (substitute number with processor numbers)

 Also, every small change, it will took a lot of time by the linker to do its 
 business.
 I do believe the only way would be implement dynamic objects or someting but 
 it will change drastically the architecture. :/

It is actually done with dynamic objects. *Large* dynamic objects :D

C++ is not famous for generating small code especially in debug
builds...

-- 
Lorenzo Marcantonio
Logos Srl

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] Speed up building?

2014-07-25 Thread Maciej Sumiński

On 07/25/2014 11:04 AM, Lorenzo Marcantonio wrote:

On Fri, Jul 25, 2014 at 08:59:23AM +, Mário Luzeiro wrote:

Hello,
Is is possible speed up building (in linux) some how? (without to buy a faster 
computer)
It looks it is not building using multiprocessor.


make -j4 helps (substitute number with processor numbers)


Also, every small change, it will took a lot of time by the linker to do its 
business.
I do believe the only way would be implement dynamic objects or someting but it 
will change drastically the architecture. :/


It is actually done with dynamic objects. *Large* dynamic objects :D

C++ is not famous for generating small code especially in debug
builds...



Hi,

If you have a spare PC, then you may use distcc to distribute 
compilation to a few machines. binutils-gold are expected to decrease 
the linking time.


Regards,
Orson

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] Speed up building?

2014-07-25 Thread Martin Janitschke
On 25.07.2014 11:04, Lorenzo Marcantonio wrote:
 On Fri, Jul 25, 2014 at 08:59:23AM +, Mário Luzeiro wrote:
 Hello,
 Is is possible speed up building (in linux) some how? (without to buy a 
 faster computer)
 It looks it is not building using multiprocessor.
 
 make -j4 helps (substitute number with processor numbers)
Besides this, you can also use ccache, build inside a ramdisk (if you've
got plenty of it), prefill the filesystem cache with the kicad sources
and your .ccache folder using vmtouch.

 Also, every small change, it will took a lot of time by the linker to do its 
 business.
 I do believe the only way would be implement dynamic objects or someting but 
 it will change drastically the architecture. :/
Small changes to the header files may end in a lot of missed cache hits
from ccache.

Bye,
imp

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] Speed up building?

2014-07-25 Thread Lorenzo Marcantonio
On Fri, Jul 25, 2014 at 11:24:21AM +0200, Martin Janitschke wrote:
 Besides this, you can also use ccache, build inside a ramdisk (if you've
 got plenty of it), prefill the filesystem cache with the kicad sources
 and your .ccache folder using vmtouch.

In practice I found ccache not very useful. Also take aside at least 5GB
for it, otherwise it usually spills over.

 Small changes to the header files may end in a lot of missed cache hits
 from ccache.

Reason for ccache not being useful :D

distcc is way better, if another box is available.

-- 
Lorenzo Marcantonio
Logos Srl

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] Speed up building?

2014-07-25 Thread Dick Hollenbeck
On 07/25/2014 03:59 AM, Mário Luzeiro wrote:
 Hello,
 Is is possible speed up building (in linux) some how? (without to buy a 
 faster computer)
 It looks it is not building using multiprocessor.
 
 Also, every small change, it will took a lot of time by the linker to do its 
 business.
 I do believe the only way would be implement dynamic objects or someting but 
 it will change drastically the architecture. :/
 
 MRL

Some tips:

**) if you are editing a header file, this is typically to change the behaviour 
of one
*.cpp file of immediate concern.  So compile that *.cpp module first, rather 
than letting
the makefile decide to compile everything that depends on the header first.  
After your
header file edits compile in the context of that one *.cpp module of immediate 
concern,
then compile the rest of the link image.

Example:

$ cd build-debug/kicad   ( I am working on kicad.exe, not pcbnew, eeschema, 
cvpcb, etc. )

$ make help | grep config
... prjconfig.o
... prjconfig.i
... prjconfig.s

This means I can make prjconfig.o explicitly *first*.

$ make prjconfig.o

When that makes/compiles, it proves my header file edits are good to go for the 
rest of
the link image, so now I only build kicad(exe), since that is what I am working 
on:

$ make kicad -j4

When done, at end of day or for patch preparation, then build the whole project:

$ cd ..   back up to build-debug
$ make -j4
$ bzr diff  /tmp/patch


==

**) This discussion would not be complete without mentioning the obvious fact 
that a
faster computer does build the system faster.   This is actually the most 
important fact
to consider and tackle.

There are handicaps in golf.  I know of no sporting reason to have them in 
software
development.

And the cost of the computer is typically one of those famous self regulating 
problems:

The guy at the keyboard's time will tend to be valued according to its actual 
value in the
marketplace.


Dick


___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp