From 3ab7d8835f9ca0259a0d674778dadaaf952d3c6f Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Tue, 19 May 2015 13:03:01 -0700 Subject: [PATCH] Use proptools.CloneEmptyProperties CloneEmptyProperties is much faster than CloneProperties followed by ZeroProperties. Cuts >100ms off soong_build runtime, which will become more important when we start calling soong_build a second time to automatically generate documentation. Change-Id: I45d948b36d9937a21b13dab068c3ce9a60b5a59b --- common/arch.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/common/arch.go b/common/arch.go index 2a09ae959..4ea0f268b 100644 --- a/common/arch.go +++ b/common/arch.go @@ -377,8 +377,7 @@ func InitArchModule(m AndroidModule, defaultMultilib Multilib, archProperties := &archProperties{} forEachInterface(reflect.ValueOf(archProperties), func(v reflect.Value) { - newValue := proptools.CloneProperties(propertiesValue) - proptools.ZeroProperties(newValue.Elem()) + newValue := proptools.CloneEmptyProperties(propertiesValue) v.Set(newValue) })