-
Notifications
You must be signed in to change notification settings - Fork 8
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
Investigate performance improvement to balance off correctness #798
Comments
Here is a summary of our investigation. We explored extracting the code that 1) assembles the derived data directory, 2) synchronizes the resulting derived data All three items can benefit from the Despite having a small impact on the performance, the potential of such change would undoubtedly be more beneficial given some improvement to Gradle. We could also try to avoid the work in the second item.
|
Consuming the derived data in place does bring some performance improvement. It's safe to say that we should export the derived data directory as used by Xcode, leaving the consumer to cherry-pick what they want from the directory. This behaviour should most likely only be internal, as if the derived data is restored from the cache it won't contain the same files (aka intermediate files are ignored). |
With the last change, we are ~1s faster than Xcode in terms of incremental build (up-to-date checking). We could be faster, but we are still waiting for a response from the Gradle team. We would still need to shave about 2-3s to reach our target of 40% faster. Depending on what the Gradle team may respond, that may be the key to achieving this work. There are probably 500ms we can shave during the configuration phase. That being said, Gradle would still be extremely fast when it comes to restoring from the cache as there will be no need to execute a rebuild. So cases bouncing between branches or a warm cache from CI would all be faster than Xcode. |
See this branch for the work done as part of this spike. |
Still waiting for a response from the Gradle team regarding snapshotting task inputs/outputs in parallel. The closes response we got is Configuration Cache should allow this, but Configuration Cache is broken because of gradle/gradle#22215. The only solution is to "erase" the nested provider during task dependency calculation which is not trivial. |
As a Nokee developer, I want to ensure Gradle + Nokee achieves a 40% performance improvement over straight Xcode, so the case for Gradle + Nokee is compelling.
This issue is not about the fact that we cannot achieve a 40% performance improvement over Xcode; it's about finding the current inefficiency in the task execution that prevents us from achieving the 40% performance improvement. So far, we have been chasing around small inefficiencies, such as unrolling Java Stream or using arrays instead of
List
. However, from our latest profiling run, assembling the derived data directory is showing up quite strongly. Despite our initial attempt to colocalize all our work into a single task, we may require access to some of Gradle's internal performance features (such as virtual file system watching). For this to happen using public APIs, we would need to split the Xcode target task into multiple independent Gradle tasks. This issue is about investigating what is required for this work and determining the performance improvement this change would introduce.Acceptance Criteria
Product
directory? To conclude the build, we sync theProduct
directory of the derived data directory into a new directory for each consumption by the downstream tasks. We should look into avoiding this extra sync to reduce the work.The text was updated successfully, but these errors were encountered: