You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This feature can already be implemented through a plugin
Describe the user story
yarn run commands take about 2-3 seconds on a workspace with 250 packages
yarn workspaces foreach --parallel exec echo hello takes 2 minutes to run with 100% cpu usage
Describe the solution you'd like
The functions that take most of the time are setupResolutions and setupWorkspaces, we should make those functions time complexity constant, storing the needed data structures in the cache and updating those only on install
Describe the drawbacks of your solution
Describe alternatives you've considered
An alternative to using a cache for needed data structures is making the algorithms faster, this isn't a real solution, you can't make a full tree traversal in constant time
Additional context
The text was updated successfully, but these errors were encountered:
While there's likely room to improve things, I'll close this issue as there isn't a definite action item and it'd likely remain open forever. I'd suggest to read the relevant parts of the code (and ask questions on Discord if any), and directly open a PR to improve the code incrementally.
Note that caches have their own costs (they need to be kept in sync, they add complexity in the code) that may make them a not-so-great option. Not everything has to belong to the core, and perhaps if you have high-perf requirements on 250 workspaces it's worth considering implementing your own commands that do less things than us, but in a more efficient way.
Describe the user story
yarn run
commands take about 2-3 seconds on a workspace with 250 packagesyarn workspaces foreach --parallel exec echo hello
takes 2 minutes to run with 100% cpu usageDescribe the solution you'd like
The functions that take most of the time are
setupResolutions
andsetupWorkspaces
, we should make those functions time complexity constant, storing the needed data structures in the cache and updating those only on installDescribe the drawbacks of your solution
Describe alternatives you've considered
An alternative to using a cache for needed data structures is making the algorithms faster, this isn't a real solution, you can't make a full tree traversal in constant time
Additional context
The text was updated successfully, but these errors were encountered: