jscutlery / nx-completion

Nx workspace completion plugin for Zsh.
MIT License
135 stars 14 forks source link

Fix performance issues with large projects #18

Closed jensweigele closed 1 year ago

jensweigele commented 1 year ago

In a bigger workspace (more than 300 targets across more than 80 projects) the "nx run " auto-complete was terribly slow (~15s-20s on an M1)

With this PR the collection of the targets is done with a single jq-query instead of making a separate query for each project which gives a result nearly instantly.

Furthermore I had to remove the "caching" of the workspace graph to be able to pickup changes done to the workspace.json.

This caching could be reintroduced again by hashing the actual workspace.json together with "sub-jsons" - but this was out of scope now.

edbzn commented 1 year ago

Hey, thanks for the improvements!