Skip to content

[IncludeTree] IncludeTreeFileList optimizations #10656

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: next
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.
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
Copy link
Author

@swift-ci please test llvm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant