-
Notifications
You must be signed in to change notification settings - Fork 25
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
[Feature]: Improved caching #191
Merged
Merged
Conversation
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
…itory management.
IDE Tests and improvements still pending.
Creating a dual run working environment.
Last commit published: 1a246d5311dc76239f9e04a4b221e233e8ad6eab. PR PublishingThe artifacts published by this PR:
Repository DeclarationIn order to use the artifacts published by the PR, add the following repository to your buildscript: repositories {
maven {
name 'Maven for PR #191' // https://github.com/neoforged/NeoGradle/pull/191
url 'https://prmaven.neoforged.net/NeoGradle/pr191'
content {
includeModule('net.neoforged.gradle', 'mixin')
includeModule('net.neoforged.gradle', 'common')
includeModule('net.neoforged.gradle', 'dsl-mixin')
includeModule('net.neoforged.gradle', 'neoform')
includeModule('net.neoforged.gradle', 'dsl-platform')
includeModule('net.neoforged.gradle', 'dsl-common')
includeModule('net.neoforged.gradle.common', 'net.neoforged.gradle.common.gradle.plugin')
includeModule('net.neoforged.gradle', 'userdev')
includeModule('net.neoforged.gradle', 'dsl-userdev')
includeModule('net.neoforged.gradle.userdev', 'net.neoforged.gradle.userdev.gradle.plugin')
includeModule('net.neoforged.gradle', 'utils')
includeModule('net.neoforged.gradle', 'dsl-vanilla')
includeModule('net.neoforged.gradle', 'vanilla')
includeModule('net.neoforged.gradle.mixin', 'net.neoforged.gradle.mixin.gradle.plugin')
includeModule('net.neoforged.gradle.vanilla', 'net.neoforged.gradle.vanilla.gradle.plugin')
includeModule('net.neoforged.gradle.platform', 'net.neoforged.gradle.platform.gradle.plugin')
includeModule('net.neoforged.gradle', 'platform')
includeModule('net.neoforged.gradle.neoform', 'net.neoforged.gradle.neoform.gradle.plugin')
includeModule('net.neoforged.gradle', 'dsl-neoform')
}
}
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TLDR:
Config Cache support
Due to changes to how we process files (mostly, for now through a method handle to the relevant files) we can create the virtual repository automatically without Gradle getting mad at us for creating files during the config phase.
This solves the major issue and allows most, if not all interactions related to the config cache to fully work.
The support for this is experimental, please open tickets if you run into issues with specific tasks, or other subsystems of NG7 that don't support it yet.
Cache stability
By design we achieve a 3 run cache stability.
This means that the config cache will reuse the configuration data from the 3. run forward, mainly for two reason. Stability less then 2 is not possible natively in gradle. However, we need one extra run because gradle detects that the first run properly filled up the virtual repository with all needed files. Regardless, it will still reuse a lot of the task data, just not the configuration phase data, causing only a minor slow down.
Central task caching
This PR introduces caching for task executions and formalizes a caching procedure for central caching services.
Based on the OS a specific locking mechanism is used:
Additionally we mark any successful execution of the cache using a healthy marker file, which we track during follow up executions to make sure that the resulting output is actually healthy or not.
Cache id calculation
We use the same algorithm and implementation that gradle does, with some minor changes. First of all we do not cache the classpath, but the task class name, second of all our algorithm caches file inputs seperately, and skips value objects, which are anyway unpacked in the input map anyway. So it would be double caching.
Fixed bugs:
Closes: #187
Closes: #186
Closes: #182