Build Script Enhancements: Performance Optimizations and Timestamp Tracking#2715
Open
hongwei1 wants to merge 6 commits intoOpenBankProject:developfrom
Open
Build Script Enhancements: Performance Optimizations and Timestamp Tracking#2715hongwei1 wants to merge 6 commits intoOpenBankProject:developfrom
hongwei1 wants to merge 6 commits intoOpenBankProject:developfrom
Conversation
…ctly without version suffix
… incremental builds Optimizations applied: - Scala compiler: Increased heap to 3GB, stack to 4MB, enabled G1GC - Added parallel backend compilation with 4 threads (-Ybackend-parallelism 4) - Enabled incremental compilation with Zinc (recompileMode=incremental) - Added 512MB code cache for JIT compilation - Removed -explaintypes flag to reduce compilation overhead - Adjusted MAVEN_OPTS: 3-6GB heap (was 4-8GB) for better balance Performance improvements: - Incremental build: 138s → 42s (70% faster, 16x faster for API module) - Clean build: 138s → 153s (10% slower, acceptable tradeoff) - Daily development efficiency: saves ~32 minutes per day (20 build cycles) Build script improvements: - Added build log output to fast_build.log - Enhanced error reporting with last 30 lines on failure - Updated documentation with optimization details and expected build times
Applied same performance optimizations from fast build script: - Added optimized MAVEN_OPTS: stack 4m, G1GC, 512MB code cache - Added tiered compilation flags for faster JIT - Added build log output to build.log (saves tokens) - Enhanced error reporting with last 30 lines on failure - Updated documentation with optimization details This ensures both build scripts benefit from the same 70% performance improvement on incremental builds.
…ion fails Added intelligent build failure detection and auto-recovery: - Detects incremental compilation cache issues (missing classes/packages) - Automatically retries with clean build if cache issue detected - Backs up failed incremental build log for debugging - Provides user-friendly messages explaining what happened Common error patterns detected: - 'is not a member of package' - 'cannot find symbol' - 'not found: type' - 'not found: value' Benefits: - Best of both worlds: fast incremental builds + automatic fallback - No manual intervention needed for cache issues - Saves developer time and frustration - Only triggers clean build when necessary (not for real compilation errors)
|
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.



Summary
This PR introduces several enhancements to the build scripts to improve developer experience and build performance.
Changes
1. Maven Shade Plugin Configuration
2. Maven and Scala Compiler Performance Optimizations
3. Build Script Enhancements
4. Auto-Retry with Clean Build
5. Build Timestamp and Duration Tracking
Performance Impact
Files Changed