changeset 15497:1f28c463e452

mx: slight tweak of parallel Java build heuristics
author Doug Simon <doug.simon@oracle.com>
date Mon, 05 May 2014 13:24:57 +0200
parents f5eba273a4f2
children e30d7eaa290d
files mxtool/mx.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mxtool/mx.py	Mon May 05 13:17:32 2014 +0200
+++ b/mxtool/mx.py	Mon May 05 13:24:57 2014 +0200
@@ -2143,9 +2143,9 @@
         def compareTasks(t1, t2):
             d = remainingDepsDepth(t1) - remainingDepsDepth(t2)
             if d == 0:
-                d = len(t1.proj.annotation_processors()) - len(t2.proj.annotation_processors())
-                if d == 0:
-                    d = len(t1.javafilelist) - len(t2.javafilelist)
+                t1Work = (1 + len(t1.proj.annotation_processors())) * len(t1.javafilelist)
+                t2Work = (1 + len(t2.proj.annotation_processors())) * len(t2.javafilelist)
+                d = t1Work - t2Work
             return d
 
         def sortWorklist(tasks):