Skip to content
Commit 01ee36ee authored by Colin Cross's avatar Colin Cross
Browse files

Optimize proptools

proptools cloning and extending are a significant portion of the run
time for Soong.  Optimize out calls to reflect.Type.Field(), which must
allocate a []int to store the index, by caching all the fields of each
type as it is seen, and by iterating over a slice of cached fields
instead of calling Field(i) for each one.  Also avoid calling
reflect.Value.Interface() twice on the same Value.

Change-Id: I4e13fc85f30d8614a5586283e928c0a6d7f24809
parent 9544a07d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment