Add recursive package memory for quicker builds - #726
Open
tylerjonesio wants to merge 1 commit into
Open
Conversation
marcprux
reviewed
Aug 22, 2026
marcprux
left a comment
Member
There was a problem hiding this comment.
This looks like a nice simple fix! How extensively have you exercised this on your own projects? Have you noticed any glitches (like stale builds)?
Author
|
I've tested an earlier version of this off an on for a couple of weeks. I've tested this specific revision a little more heavily the past few days. I was a little nervous digging into this since this is such a key component, but so far I haven't noticed any stale builds or bad side effects. Just quicker builds! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes #709. With large package graphs, running the skipstone build tool plugin could take a very long time and potentially cause OOM errors within Xcode. By adding recursive memory to the
recursivePackageDependencies(for package: Package)anddependencies(for targetDependencies: [TargetDependency], in package: Package)functions, we can ensure the built tool doesn't needlessly traverse packages that have already been seen.Skip Pull Request Checklist:
swift testCodex was used to help investigate performance issues and make a first pass at these improvements. I followed up with some code cleanup and tested against my own project. The built tool time went from ~300 seconds to 1 second.