This message was deleted.
s
This message was deleted.
m
It actually looks like TS is just way slower than Python, even if I don’t use any extension libraries… Can a pulumi expert confirm?
ok so im doing
pulumi preview -v 4
to see the logs. I’m consistently seeing 30+ seconds in between these two lines:
Copy code
I0915 19:33:38.453651     775 ignore.go:44] Explicitly ignoring and discarding error: no git repository found from /scratch/services/Pulumi.yaml
I0915 19:34:11.696895     775 eventsink.go:59] AWS Auth provider used: "EnvProvider"
and here, for what looks like a 10 second RPC call to fetch a StackReference:
Copy code
I0915 19:34:14.983674     775 eventsink.go:59] RegisterResource RPC finished: resource:services-dev[pulumi:pulumi:Stack]; err: null, resp: urn:pulumi:dev::services::pulumi:pulumi:Stack::services-dev,,bucket_id,,,jetpack-services-97de821,,
I0915 19:34:25.813776     775 eventsink.go:59] Running program '/scratch/services' in pwd '/scratch/services' w/ args:
and another 8 seconds on presumably another RPC call:
Copy code
I0915 19:34:26.544895     775 eventsink.go:59] Trying to get account information via sts:GetCallerIdentity
I0915 19:34:32.696598     775 step_executor.go:321] StepExecutor worker(3): step read on urn:pulumi:dev::services::pulumi:pulumi:StackReference::jetpack/infra/dev retired
g
Part of the difference is likely the compilation step that’s present in NodeJS, but not in Python. IIRC, Python usually has the fastest updates because it’s interpreted rather than compiled.
Although I would expect the difference to be a relatively small constant. I’m a bit surprised at the big difference in your initial message.
w
FWIW - I would be a bit surprised by any significant slowdown in TypeScript vs. Python - though @gorgeous-egg-16927 is right that strictly TS is doing more work. Do you have more data on the comparison you did between languages? My inclincation would be to believe there is some other difference.
You can get more insight on performance by following the steps at https://www.pulumi.com/docs/troubleshooting/#performance and sharing the trace file(s) if you'd like confirmation on what the root cause might be (which would be great to understand in case we can improve it).
FWIW - the log lines you mention above look like they are related to the AWS provider - which has a relatively large fixed cost time to startup with current defaults. We have been considering changing defautls to improve performance there - details and tips for configuration you can try out to see if it improves performance at https://github.com/pulumi/pulumi-aws/issues/873.
m
Thanks @white-balloon-205 and @gorgeous-egg-16927. I’ll take a look. I saved the logs with
--verbose 4
and also saved the trace file. I’ve never used AppDash so it’ll take me a little while to interpret the trace. and I guess I’ll check the AWS issue you pointed out too… but first im going to focus on getting my projects to actually work as i need them to, and then focus on optimizing the performance. i’ll probably circle back on this in 1-2 days. appreciate your help!
👍 1