platform_build_blueprint/proptools
Colin Cross c4fc4b447f Optimize (Extend|Append|Prepend)[Matching]Properties
The property squashing functions were performing 19% of all allocations
and allocating 3.43 GB, most of which was used to track the name of the
property, but the name of the property is only used to print errors.
Keep the elements of the name in a preallocated slice instead, and only
compute the name when an error occurs.

Calling reflect.Value.Interface() was also expensive, and only passed
to filter and order functions, none of which use the values.  Modify
the signature of the filter and order functions to remove the interfaces
and the property name.

Test: extend_test.go
Change-Id: I517f89daf251bb43f7cfefa6f1e83951c0e271b7
2024-02-02 15:57:26 -08:00
..
clone.go Add support for maps as properties 2021-05-26 09:54:22 -04:00
clone_test.go Fix TestCloneProperties for go 1.21 2023-11-08 22:07:58 -08:00
escape.go Optimize NinjaEscapeList to avoid allocating an output slice 2023-11-01 15:15:16 -07:00
escape_test.go Fix TestExternalShellEscaping and TestExternalShellEscapeIncludingSpaces on darwin 2023-12-15 16:30:59 -08:00
extend.go Optimize (Extend|Append|Prepend)[Matching]Properties 2024-02-02 15:57:26 -08:00
extend_test.go Optimize (Extend|Append|Prepend)[Matching]Properties 2024-02-02 15:57:26 -08:00
filter.go Always shard structs if they would exceed maxNameSize even if unfiltered 2021-03-26 09:59:19 +00:00
filter_test.go Always shard structs if they would exceed maxNameSize even if unfiltered 2021-03-26 09:59:19 +00:00
hash_provider.go Use WriteString in hashProviderInternal 2024-02-02 15:57:26 -08:00
hash_provider_test.go Enforce that providers are not changed 2024-01-30 15:18:24 -08:00
proptools.go Add a new util to clear a property 2023-12-04 11:01:23 +09:00
proptools_test.go Add a new util to clear a property 2023-12-04 11:01:23 +09:00
tag.go Add support for maps as properties 2021-05-26 09:54:22 -04:00
tag_test.go propertyIndexesWithTag can handle slice of struct 2021-02-24 01:02:59 +09:00
typeequal.go Support nil pointers to structs in properties 2016-08-05 17:19:36 -07:00
typeequal_test.go Support nil pointers to structs in properties 2016-08-05 17:19:36 -07:00
unpack.go Remove unnecessary used names before reporting 2024-01-04 12:24:39 -08:00
unpack_test.go Remove unnecessary used names before reporting 2024-01-04 12:24:39 -08:00