[Scons-dev] Issues that can potentially be closed
William Blevins
wblevins001 at gmail.com
Sat Jul 12 11:01:29 EDT 2014
To clarify my compiler comment, Oracle javac is NOT multithreaded, but some
other compilers like Eclipse are though I'm not sure if the speedup is
worthwhile, so just ignore it.
On Sat, Jul 12, 2014 at 10:57 AM, William Blevins <wblevins001 at gmail.com>
wrote:
> Javac works with what you give it.
>
> If there are dependencies between datasets, then they will not build;
> otherwise, they will compile just fine. There are optimization concerns
> though and here are some cases:
>
> Java('build',
> [source1, source2],
> JAVASOURCEPATH='src')
>
>
> Note: keep in mind that the javac call will multithread automatically; I don't know if it default to 2 threads or to physical_core_count, but there is some auto-optimization here.
>
> Case 1:
>
> source1 = [ 1.java, 2.java, #.java ]
>
> source2 = [ a.java, b.java, n.java ]
>
> This is probably fine since you are optimizing the compilation by splitting of build trees.
>
> Case 2:
>
> source1 = 1.java
>
> source2 = 2.java
>
> sourceN = N.java
>
> This is bad; there is a lot of overhead. Java builds are not synonomous to c-like compiles.
>
> Case 3:
>
> source1 = dir1
>
> source2 = dir2
>
> This is essentially equivalent to case 1 and is fine.
>
> ---
>
> Long story short, the sources should probably be flattened, but there is also a performance issue with SCons java toolset atm which chokes on Java( ... ) calls with a large number of source inputs. Dirk and I have been discussing this on BitBucket and allowing for splitting of files like this may be useful currently.
>
> V/R,
>
> William
>
>
>
>
> On Sat, Jul 12, 2014 at 10:31 AM, Gary Oberbrunner <garyo at oberbrunner.com>
> wrote:
>
>>
>>
>>
>> On Sat, Jul 12, 2014 at 10:22 AM, William Blevins <wblevins001 at gmail.com>
>> wrote:
>>
>>>
>>> 2432 definitely duplicates 1772. The only difference is that 2432
>>> proposes a (bad) solution to the problem.
>>>
>>> Both give the example:
>>>
>>> Java('build',
>>> [source1, source2],
>>> JAVASOURCEPATH='src')
>>>
>>> And explain that "their" issue is that source1 and source2 build in parallel with separate javac commands; this is easily fixable with a FLATTEN call, but we still haven't asked the important question. Is this working as designed and the documentation needs to be updated to reflect or is this a software failure?
>>>
>>> I see what you mean now, William. I'm OK with marking as dup. As for
>> your big question, again I'm not the right guy to say but my understanding
>> is javac works much better when all the .java files are passed on the same
>> invocation.
>>
>> --
>> Gary
>>
>> _______________________________________________
>> Scons-dev mailing list
>> Scons-dev at scons.org
>> http://two.pairlist.net/mailman/listinfo/scons-dev
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/scons-dev/attachments/20140712/7a40f70b/attachment.html>
More information about the Scons-dev
mailing list