pulumi/pkg/cmd/pulumi
Evan Boyle e1576d13b3
make plugin metadata (size, install time) opt in for list operations (#7163)
This change is a simple perf optimization to speed up the process of listing plugins by excluding some metadata like size by default.

Our strategy for finding a plugin is to first look on the path, and then to iterate through all plugins in the plugin cache (a directory). We do this for each plugin that is loaded when NewProvider is called. Unfortunately, the codepath that gets all plugins is shared by pulumi plugin ls that needs to do things like display the total size of all plugins, the size of each plugin, and when the plugin was last installed/last used.

This means that any time a plugin is loaded, we are computing the size of all plugins by recursively enumerating all folder (including all of the node_modules directories of any installed node multi-lang plugins!). For my 5 gb of node plugins this translated to 10s of overhead each time a plugin was loaded.

This change is a very simple fix. pulumi plugin ls is the only code path that uses size, so we create a dedicated code path GetPluginsWithMetadata that populates that info, excluding from the result of GetPlugins by default.
2021-05-28 07:26:08 -07:00
..
cancel.go Re-add [BREAKING] - Standardize stack select behavior (#6300) (#6840) 2021-04-22 14:10:39 +01:00
config.go Re-add [BREAKING] - Standardize stack select behavior (#6300) (#6840) 2021-04-22 14:10:39 +01:00
config_test.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
console.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
crypto.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
crypto_cloud.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
crypto_http.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
crypto_http_test.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
crypto_local.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
destroy.go Add user agent to the CLI, Go and Nodejs Automation API SDKs (#6935) 2021-04-30 07:26:23 -07:00
doc.go Document Go packages (#6009) 2021-01-11 11:07:59 -07:00
errors.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
gen_completion.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
gen_markdown.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
import.go Add user agent to the CLI, Go and Nodejs Automation API SDKs (#6935) 2021-04-30 07:26:23 -07:00
login.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
logout.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
logs.go Re-add [BREAKING] - Standardize stack select behavior (#6300) (#6840) 2021-04-22 14:10:39 +01:00
logs_test.go Move pulumi cmd sources into cmd/pulumi. (#4324) 2020-04-07 15:53:20 -07:00
main.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
new.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
new_test.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
plugin.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
plugin_install.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
plugin_ls.go make plugin metadata (size, install time) opt in for list operations (#7163) 2021-05-28 07:26:08 -07:00
plugin_rm.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
policy.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
policy_disable.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
policy_enable.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
policy_group_ls.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
policy_ls.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
policy_new.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
policy_new_test.go jaxxstorm/build fixes (#5483) 2020-10-08 12:43:38 -07:00
policy_publish.go Make virtualenv paths relative to root when main points elsewhere (#6966) 2021-05-14 13:41:55 -04:00
policy_rm.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
policy_validate.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
preview.go Add user agent to the CLI, Go and Nodejs Automation API SDKs (#6935) 2021-04-30 07:26:23 -07:00
pulumi.go [cli] Removing the deprecated pulumi history command (#6724) 2021-04-14 19:32:18 +01:00
pulumi_test.go improve dev version detection (#4732) 2020-06-02 11:51:04 +01:00
query.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
refresh.go Add user agent to the CLI, Go and Nodejs Automation API SDKs (#6935) 2021-04-30 07:26:23 -07:00
stack.go Re-add [BREAKING] - Standardize stack select behavior (#6300) (#6840) 2021-04-22 14:10:39 +01:00
stack_change_secrets_provider.go Refactor Mock newResource and call to accept property bag rather than individual args (#6672) 2021-04-14 19:32:18 +01:00
stack_export.go [cli] Ensure the user has set PULUMI_CONFIG_PASSPHRASE or PULUMI_CONFIG_PASSPHRASE_FILE (#6893) 2021-04-28 01:21:16 +01:00
stack_graph.go Re-add [BREAKING] - Standardize stack select behavior (#6300) (#6840) 2021-04-22 14:10:39 +01:00
stack_history.go Re-add - Set pagination defaults for `pulumi stack history` to 10 entries (#6739) (#6841) 2021-04-22 13:52:27 +01:00
stack_import.go Re-add [BREAKING] - Standardize stack select behavior (#6300) (#6840) 2021-04-22 14:10:39 +01:00
stack_init.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
stack_ls.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
stack_ls_test.go Move pulumi cmd sources into cmd/pulumi. (#4324) 2020-04-07 15:53:20 -07:00
stack_output.go Re-add [BREAKING] - Standardize stack select behavior (#6300) (#6840) 2021-04-22 14:10:39 +01:00
stack_output_test.go Move pulumi cmd sources into cmd/pulumi. (#4324) 2020-04-07 15:53:20 -07:00
stack_rename.go Re-add [BREAKING] - Standardize stack select behavior (#6300) (#6840) 2021-04-22 14:10:39 +01:00
stack_rm.go Re-add [BREAKING] - Standardize stack select behavior (#6300) (#6840) 2021-04-22 14:10:39 +01:00
stack_select.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
stack_tag.go Re-add [BREAKING] - Standardize stack select behavior (#6300) (#6840) 2021-04-22 14:10:39 +01:00
state.go Re-add [BREAKING] - Standardize stack select behavior (#6300) (#6840) 2021-04-22 14:10:39 +01:00
state_delete.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
state_unprotect.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
up.go Add user agent to the CLI, Go and Nodejs Automation API SDKs (#6935) 2021-04-30 07:26:23 -07:00
up_test.go Move pulumi cmd sources into cmd/pulumi. (#4324) 2020-04-07 15:53:20 -07:00
util.go Add user agent to the CLI, Go and Nodejs Automation API SDKs (#6935) 2021-04-30 07:26:23 -07:00
util_test.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
version.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
view-trace.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
watch.go Add user agent to the CLI, Go and Nodejs Automation API SDKs (#6935) 2021-04-30 07:26:23 -07:00
whoami.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00