-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Import based on compilation outputs (#53)
This PR adds the capability to import output files from a compilation: to improve performance and experiment with using a "global shared index" while remote caching a subset for lib. The github issue has some overall mentions of this bazelbuild/rules_swift#561 Index while building is performant in clang and swift becauase it conditionally writes data based on files in a global index cache reused across all clang/swift invocations in the build. The overhead of 3-5% performance hit in the whitepaper of "Index while building" was hinged on the fact it'd be using a global index cache. With the per library index as rules_swift implemented this feature, "Index while building" adds a 300% increase in build times in my testing. Longer term, can add flags to clang and swift indexing to be aware of remote compilation and caching, this is a quick hack incase that doesn't ever happen. Remote build possibilities: The plan is to be able to use a global index on compilation fix compilation performance and minimize the O ( M imports * N modules ) disk usage. I'd then intend to use this code to import a subset of the global index material into the remote cache by putting it in `bazel-out` at `swift_library`'s "index-store" path. Eventually a feature can be added to rules_cc following the same pattern for .m, .cpp Local build possibilities: I plan to import swift_library cache remote cache hits from `bazel-out` into Xcode's index. However, importing output files as a capability is useful even if that doesn't play out: if we orient index-import around output files, then it doesn't have to enumerate and process an entire index ever again. Another build related program ran aas an aspect or via BEP could read outputs and then invoke index-import with these outputs.
- Loading branch information
1 parent
44fbe01
commit d90eb46
Showing
1 changed file
with
90 additions
and
39 deletions.
There are no files selected for viewing
This file contains 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