baibaichen opened a new pull request, #11595:
URL: https://github.com/apache/incubator-gluten/pull/11595

   ### What changes were proposed in this pull request?
   
   Gluten's incremental C++ builds take ~3 minutes even for no-op builds 
(make-based workflow), making the AI-driven edit → compile → test → fix loop 
impractically slow. With this new `dev/inc-build-cpp.sh` script using Ninja and 
smart vcpkg timestamp preservation, incremental builds now complete in under 30 
seconds and zero-change builds in 0.27 seconds.
   
   **Performance Improvements:**
   - Switch from Make to Ninja: 4m53s → 0.1s no-op builds (1400x faster)
   - Skip redundant cmake configure steps (let Ninja handle regeneration)
   - Default skip vcpkg check (use --update_vcpkg when needed)
   - Preserve vcpkg timestamps to avoid unnecessary relinking
   - **Result: 3m14s → 0.27s total no-op time**
   
   **Features:**
   - Auto-detects BUILD_TYPE from velox _build/debug or _build/release directory
   - Auto-detects SCALA_VERSION from backends-velox/target/scala-X.XX directory 
 
   - Auto-extracts vcpkg options (BUILD_TESTS, ENABLE_S3/GCS/ABFS) from 
CMakeCache.txt
   - Validates CMakeCache.txt exists (required for incremental build)
   - Self-contained: no dependency on build-helper-functions.sh for easy 
maintenance
   
   **Usage:**
   ```bash
   ./dev/inc-build-cpp.sh [--build_type=Debug|Release] [--scala_version=2.13] 
[--update_vcpkg]
   ```
   
   ### Why are the changes needed?
   
   AI-assisted development requires fast iteration cycles. The existing 
`dev/package-vcpkg.sh` is designed for full builds and includes overhead from 
Velox source reset, OS dependency setup, and Maven builds. This script focuses 
purely on incremental C++ compilation for the edit → compile → test → fix loop.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No, this is a developer tool for faster C++ incremental builds.
   
   ### How was this patch tested?
   
   - Syntax validation: `bash -n dev/inc-build-cpp.sh`
   - No-op build performance verified: 0.27s (down from 3m14s)
   - Incremental build after single-file change: ~25s
   - All lines ≤ 100 characters for code readability
   
   ### Related Issue
   
   Fixes #11559 (PR 2 of 2)  
   Previous PR: #11560
   
   ---
   
   🤖 **AI-Assisted Development:** This PR was created with Claude Code to 
optimize the AI-driven development workflow.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to