This website requires JavaScript.
Explore
Help
Register
Sign In
tequilaOS
/
platform_build_blueprint
Watch
2
Star
0
Fork
You've already forked platform_build_blueprint
0
Code
Issues
Pull requests
Projects
Releases
Packages
Wiki
Activity
Actions
c5b3c0ca9e
platform_build_blueprint
/
go.mod
4 lines
44 B
Modula-2
Raw
Normal View
History
Unescape
Escape
Add go.mod for go1.11 module support This allows using the various go commands without a GOPATH. Change-Id: I428ad3a4e884b68615e6e73168c5a844bad7c4d4
2018-07-21 22:02:56 +02:00
module
github
.
com
/
google
/
blueprint
Add proptools.Int and proptools.IntDefault Add proptools.Int and proptools.IntDefault that behave analogously to proptools.String and proptools.StringDefault. Change-Id: I41fd3417c973c9ff4a5aa6680546b4b893784745
2019-09-25 20:25:04 +02:00
Use strings instead of simpleNinjaStrings where possible Storing every string without ninja variable references through simpleNinjaString costs 24 bytes and a heap allocation. 16 bytes is used for the ninjaString.str string, 8 bytes for the ninjaString.variables *[]variableReference. An additional 8 bytes is used for the resulting pointer into the heap. The vast majority of calls to simpleNinjaString originate in blueprint.parseBuildParams, which converts all of the parameters passed to ctx.Build into ninjaStrings. All together this was allocating 1.575 GB of *ninjaString objects. Add a parseNinjaOrSimpleStrings function that converts input strings into ninjaStrings if they have ninja variable references, but also returns a slice of plain strings for input strings without any ninja variable references. That still results in 1.39 GB of allocations just for the output string slice, so also add an optimization that reuses the input string slice as the output slice if all of the strings had no variable references. Plumb the resulting strings through everywhere that the []*ninjaStrings were used. This reduces the total memory allocations inside blueprint.parseBuildParams in my AOSP aosp_cf_x86_64_phone-userdebug build from 3.337 GB to 1.786 GB. Test: ninja_strings_test.go Change-Id: I51bc138a2a6b1cc7383c7df0a483ccb067ffa02b
2023-10-31 23:15:30 +01:00
go
1.20
Reference in a new issue
Copy permalink