File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
src/Xamarin.Android.Build.Tasks/Tasks Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ namespace Xamarin.Android.Tasks {
2121
2222 public abstract class Aapt2 : AndroidAsyncTask {
2323
24+ private static readonly int DefaultMaxAapt2Daemons = 6 ;
2425 protected Dictionary < string , string > resource_name_case_map ;
2526 public int DaemonMaxInstanceCount { get ; set ; }
2627
@@ -64,7 +65,9 @@ protected virtual int GetRequiredDaemonInstances ()
6465 public override bool Execute ( )
6566 {
6667 // Must register on the UI thread!
67- int maxInstances = Environment . ProcessorCount - 1 ;
68+ // We don't want to use up ALL the available cores especially when
69+ // running in the IDE. So lets cap it at DefaultMaxAapt2Daemons (6).
70+ int maxInstances = Math . Min ( Environment . ProcessorCount - 1 , DefaultMaxAapt2Daemons ) ;
6871 if ( DaemonMaxInstanceCount == 0 )
6972 DaemonMaxInstanceCount = maxInstances ;
7073 else
You can’t perform that action at this time.
0 commit comments