https://pulumi.com logo
#golang
Title
# golang
w

white-balloon-205

03/21/2021, 5:43 AM
We've heard a lot of feedback on the large binary sizes (and slow build times and high memory requirements for build) for typical Pulumi Go programs. We have done a deep dive on the design patterns in our SDK that lead to the large size, and identified a few key things we can do to decrease the size - see https://github.com/pulumi/pulumi/issues/6591 if you are interested in the gory details. As a result of this analysis, there is one fairly small change we could make which would have a dramatic impact on binary sizes, reducing typical binary sizes by 70-80%. That is to remove the
Apply<TypeName>
methods, encouraging use of
ApplyT
directly instead (the former is a light syntactic sugar over the latter). This would be a breaking change (though with a fairly mechanical change to update code to continue working the same), and we would expect to make it in the upcoming 3.0 release if we decide to take this change. See https://github.com/pulumi/pulumi/issues/6592 for details. We would love any feedback/input from this group on the idea of making this change. Please take a look at the issue and provide any input you have there!
👌 5
c

clever-byte-21551

03/21/2021, 6:37 AM
I think despite being less convenient the pros outweigh the cons in this matter. Currently I have docker images of 400-800mb because of the current design. Evans has done some improvement to that but more optimizations are always welcome. Another thing is that working locally and constantly needing to build for running tests / local runs is really a pain (since it takes 20-30seconds to build the program)
w

wide-crayon-4093

03/22/2021, 7:50 AM
yes, please! doing manual change is nothing compared to seriously considering going back to TS runtime. very excited and looking forward to the release
w

white-balloon-205

03/24/2021, 2:03 AM
Thanks for the feedback on this. The final proposed changes for binary size reduction and
Apply
simplification as part of the upcoming Pulumi 3.0 are now at https://github.com/pulumi/pulumi/pull/6607.
3 Views