Skip to content

[IncludeTree] IncludeTreeFileList optimizations #10535

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: stable/20240723
Choose a base branch
from

Conversation

cachemeifyoucan
Copy link

@cachemeifyoucan cachemeifyoucan commented Apr 23, 2025

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.

@cachemeifyoucan cachemeifyoucan requested a review from a team as a code owner April 23, 2025 21:33
@cachemeifyoucan cachemeifyoucan requested review from benlangmuir and akyrtzi and removed request for a team April 23, 2025 21:33
@cachemeifyoucan
Copy link
Author

@swift-ci please test

@cachemeifyoucan
Copy link
Author

@swift-ci please test llvm

@cachemeifyoucan
Copy link
Author

stable branch for now as it enables some swift compiler change. Will land on next after review.

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.
@cachemeifyoucan cachemeifyoucan force-pushed the eng/PR-include-tree-file-list-optimizations branch from c0e0689 to 457d503 Compare April 24, 2025 22:43
@cachemeifyoucan
Copy link
Author

@swift-ci please test

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.

1 participant