-
Notifications
You must be signed in to change notification settings - Fork 273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Faster module resolution #3452
Comments
Hi. Are there any plans for implementing this or anything else for speeding up resolution of hundreds of modules. We are running into the performance issues as well. |
@mdragilev we're working on the next big release now - |
@vvagaytsev Thank you Vladimir. Is there a place to track when 0.13 will come out? |
@mdragilev yes, the 0.13 project GH board is https://github.com/orgs/garden-io/projects/5 The goal is to release it in Q1 2023. |
any update on timelines for this feature/0.13 release? |
@tedchang77 we're planning to do a pre-release for public testing by the end of March. The production release is planned for Q2 2023. |
We're planning on migrating to 0.13. Is there a timeline for when this will be implemented? |
We're working on this right now @tedchang77! Can't quite commit to a timeline until we've tested it a bit but expect no more than a couple of weeks. |
We've only partially addressed this, so leaving it open still. |
Yeah I think this needs to be revisited now that we have a partial implementation. We may want to open a new issue that's more specific. |
Can we close this now that |
Users that have hundreds of modules in their Garden project, are running into performance issues. Starting most Garden commands takes a long time, because Garden is currently running multiple
git ls-files
calls for each module.Technical background
Garden relies heavily on Git for scanning module/action source trees, to determine the scope of build contexts and versions of each node in the Stack Graph.
Right now the tree scanning is done in a fairly naive way, basically calling out (even multiple times) to the
git ls-files
CLI command for each module in a project, with limited optimizations made when different modules/actions share a directory, overlap etc.Proposed solution
VcsHandler
attached to theGarden
instance, we create a handler for the context of each scan, i.e. when resolving actions/modules and pass it along. This allows the handler to hold state and caches during that context and then be freed.GitHandler.getTreeVersion()
for a given action/path, instead of scanning the targeted path directly viagit ls-files
calls, we1. This should respect the
dotIgnoreFile(s)
andmodules.*
(to be renamed toscan.*
) fields in the project config.1. Effectively this should be what currently happens in
VcsHandler.getFiles()
except that it streams into a tree structure instead of a list.1. A simple data structure would be a basic trie, organized by path components instead of string character. This would be a good place to start at least, and we can see how that scales.
GARDEN_GIT_SCANNER=repo
.GitHandler
or the new class which houses the new implementation.Benefits of the approach
VcsHandler
andGitHandler
are to pass an instance of the handler around during use, instead of usinggarden.vcs
. This limits the blast radius of the changes dramatically and avoids major conflict with graph V2 changes.git ls-files
calls from up-to-hundreds to a handful on each project scan.Potential concerns
Alternative approaches
git
CLI calls.The text was updated successfully, but these errors were encountered: