Reduce build time#671
Merged
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## master #671 +/- ##
============================================
- Coverage 77.41% 77.34% -0.07%
- Complexity 3294 3301 +7
============================================
Files 552 553 +1
Lines 12479 12507 +28
Branches 752 753 +1
============================================
+ Hits 9660 9673 +13
- Misses 2531 2545 +14
- Partials 288 289 +1 |
... which is deleted on shutdown hook.
... trying to save on creating temp. projects.
yuri-sergiichuk
approved these changes
Aug 28, 2021
Contributor
There was a problem hiding this comment.
@alexander-yevsyukov overall LGTM. Please consider a couple of suggestions and comments below prior to merging the PR.
My only concern with using static (per test suite and not per test case) projects is possible issues with working with a non-fresh project. If that's not smth that may anyhow mess up the tests, I'm with both hands on merging the PR.
alexander-yevsyukov
added a commit
to SpineEventEngine/config
that referenced
this pull request
Jul 1, 2026
The `updateGitHubPages` task created the `javadoc`, `html`, and `repoTemp` temporary directories via `LazyTempPath` directly under the system temp directory, with cleanup performed only eagerly (`UpdateGitHubPages.cleanup()` and `Repository.close()`). A failed build or a killed Gradle daemon leaked them permanently. `File.deleteOnExit()` cannot help — it does not delete non-empty directories. Create every such directory under a shared base directory (`<java.io.tmpdir>/io.spine.gradle.fs`) that is registered for recursive deletion via a single JVM shutdown hook, mirroring the approach of SpineEventEngine/base-libraries#671. The eager cleanup stays the primary mechanism; the shutdown hook is the safety net. Fixes #240. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or 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
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.
This PR partially addresses #670. On local tests, the build time reduced from 18 to 13 minutes. It's not much, but still saves some life...
The build time was reduced by reducing the number of test Gradle projects created and compiled. So, what we did on
@BeforeEach, we do now@BeforeAll.Another improvement of this PR is fixing the way we treat temporary directories created by tests. They were not deleted, and accumulated under the root temporary directory. The
TempDirinstances now are created under theio.spine.testingdirectory, which is deleted on JVM exit. This way it's easy to see «кто насрал», even if the cleanup fails.More work on making our treatment on temporary disk space needs to be done (SpineEventEngine/config#240).