Trying to figure out why Pulumi preview is so slow...
# general
l
Trying to figure out why Pulumi preview is so slow (i.e. pulumi up).. To confirms it's doing only the following: 1. run your program to build a graph (no compilation if already done before and nothing changed) 2. fetch current graph from state provider 3. some form of map/graph diff between old/new 4. refer to order rules/dependency to build action plan shouldn't this take milliseconds or at least sub second? dont think I've ever got the yes/no/details confirm prompt in less than 60 seconds
d
For my NodeJS stack with 757 resources, a
pulumi preview
takes 20s Running
pulumi preview --logtostderr --verbose 3 --logflow --diff
I can see that there is some slowness at the start while it's apparently reading all the "package.json" files within the "node_modules" directory, and then some slowness moving things over RPC between various providers (which probably have some startup latency of their own)
What seems to take the single-longest actually is getting the Google Cloud Project information:
Copy code
0712 08:16:44.320145 2438504 eventsink.go:59] Invoking function: tok=gcp:projects/getProject:getProject asynchronously
...
0712 08:16:52.926807 2438504 eventsink.go:59] Invoke RPC finished: tok=gcp:projects/getProject:getProject; err: null, resp: filter,,,projectId:...
which is an input required for the GCP provider, and so holds up a lot of the show during that 8s waiting
132 Views