More performance optimization#14695
Conversation
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
|||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||||
…dle.kts Co-authored-by: qodo-code-review[bot] <151058649+qodo-code-review[bot]@users.noreply.github.com>
* main: Update AI usage policy (#14698) Fix handling of DOIs (#14704) Handle ohter CrossRef response (#14696) Fix condition for processing closed issues/PRs Translate the English "change to Chinese(simplified)" to the Chinese in the warning dialog (#14690) More performance optimization (#14695) Add missing dot (and a link) Add link to PR template also if checklist is present, but not OK (#14694) Fix typo in IntelliJ code style instructions (#14693) Add import into new library to Welcome Tab (#14669) Add initial search requirements (#14633)
User description
Our build is sometimes slow.
I applied more hints from
Needs to be tested on multiple machines - we can revert if it harms.
Steps to test
gradlew --rerun-tasks compileJavaon main and on this branch.Mandatory checks
CHANGELOG.mdin a way that is understandable for the average user (if change is visible to the user)PR Type
Enhancement
Description
Enable compiler forking for improved Java compilation performance
Configure test forking to run 100 tests per process
Add Gradle parallel execution and on-demand configuration
Refactor maxParallelForks calculation using Kotlin coerceAtLeast
Diagram Walkthrough
File Walkthrough
org.jabref.gradle.feature.compile.gradle.kts
Enable Java compiler forking for performancebuild-logic/src/main/kotlin/org.jabref.gradle.feature.compile.gradle.kts
options.isFork = trueoptimization
org.jabref.gradle.feature.test.gradle.kts
Configure test forking and parallel executionbuild-logic/src/main/kotlin/org.jabref.gradle.feature.test.gradle.kts
maxParallelForkscalculation usingcoerceAtLeast(1)forcleaner Kotlin syntax
forkEvery = 100to fork tests into multiple processesgradle.properties
Enable Gradle parallel and on-demand executiongradle.properties
org.gradle.configureondemand=truefor on-demand configurationorg.gradle.parallel=truefor parallel task execution