[erlang-questions] Emake on a SMP VM

Bernard Duggan bernie@REDACTED
Mon Feb 16 00:51:56 CET 2009


Bjorn Gustavsson wrote:
> On Thu, Jan 29, 2009 at 10:54 AM, Nicolas Charpentier <nc@REDACTED> wrote:
>   
>> Hi,
>>
>> Is there any good reason why make:all/0 don't try to compile concurrently ?
>>     
>
> No.
>   
So I figured this sounded like an interesting project to spend a couple
of hours on.  I've put together a patch that takes the relatively naive
approach of spawning a new process for each file in the list and having
that do the compilation.  I originally implemented a more complex system
of specifying a number of worker processes and farming new work out to
them as they completed each compile, but testing on our project showed
this to actually perform a little worse than the naive implementation
(though how that scales to sets of hundreds or thousands of files I
wouldn't like to think).
> If we'll receive a patch of good quality, we will include it in a
> future release.
>   
I'm neither experienced nor conceited enough to imagine that my patch
would be considered "good quality", but if anyone would like to make
suggestions on what sucks about it I'm always grateful for an
opportunity to learn and make improvements :)

A patch against R12-5 is attached.  To enable concurrent building, you
need to add 'concurrent' to your make flags, otherwise the behaviour
should be unchanged.

Cheers,

Bernard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: erl_make_concurrent.patch
Type: text/x-diff
Size: 1899 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20090216/8ea4cf67/attachment.bin>


More information about the erlang-questions mailing list