Skip to content

[DoNotMerge][6.2][IncludeTree] IncludeTreeFileList optimizations #10674

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

Open
wants to merge 1 commit into
base: swift/release/6.2
Choose a base branch
from

Conversation

cachemeifyoucan
Copy link

Optimize IncludeTreeFileList to make creation and iterating to have less
overhead and easier to use:

* Unify the conflict file detection code with the code that uniquing the
  file from nested FileList so there is no need to use separate data
  structures.
* Extend the conflict file content detection to iterating method
  `forEachFile` so it is easier to discover the problem with no
  overhead since no extra data structure is needed.
* Improve the IncludeTreeFileSystem constructor to share more functions
  between two versions.
* Remove an unnecessary requirement that IncludeTree::FileList must
  contain FileEntries. It can have an empty file entries list but
  provides nesting FileList accesses.

(cherry picked from commit 74b92b0)
@cachemeifyoucan cachemeifyoucan requested a review from a team as a code owner May 13, 2025 23:24
@cachemeifyoucan
Copy link
Author

@swift-ci please test

@AnthonyLatsis
Copy link

@cachemeifyoucan FWIW the release branch gets automerged into the stable branch, so you can just land stuff on the release branch whenever you want it to be picked up by the swift-main-aligned LLVM branch.

@cachemeifyoucan
Copy link
Author

That is not optimal when llvm change as corresponding swift changes and to nominate swift change, it needs to land in main, thus llvm change needs to go to stable branch first.

@AnthonyLatsis
Copy link

Ah, this is a cross-repo change. Fair enough!

@cachemeifyoucan cachemeifyoucan changed the title [IncludeTree] IncludeTreeFileList optimizations [DoNotMerge][6.2][IncludeTree] IncludeTreeFileList optimizations May 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants