why reading output from other stacks is so slow? ...
# general
o
why reading output from other stacks is so slow? When I use
pulumi.StackReference
My backend used aws s3
e
It has to grab all the state of that stack to read the outputs, so if the state is large and your bandwidth to S3 limited it will be slow.
c
@echoing-dinner-19531 Is there any other/better way to read a single stack output from S3 back end?
e
Not at the moment. State is just one large .json file so you have to read and parse the whole file to get any bit out. I've been thinking of ways we could re-organize the way we store data on S3 to help with cases like this and some other state issues we have, but no concrete ideas yet.
c
State is just text, so it is not clear to me how the "limited bandwidth to S3" would make these updates so painfully slow...
e
Well its just text, but that's still data and for statefiles it's often megabytes of data. We've seen some users with slow uplinks to their S3 storage such that that is a noticeable delay to read. There might be other factors at play here and we're looking at adding more performance tracing to the engine to help answer questions like this, once that's all in we'd be happy to get tracefiles from users to show where real world performance issues are coming from.