-
Notifications
You must be signed in to change notification settings - Fork 240
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
@allow-large-files [javafoundations] Support incremental jar append o…
…peration Summary: **Goal: Reduce local build time by up to ~95%** **Problem:** Rebuilding large JAR files (__unstamped or shaded_jar), like fat jars, can be slow and wasteful when only the project's source code has changed. This is because the entire build process extracts all files from every dependency and repackages them, even if the dependencies themselves haven't been modified. This inefficiency becomes especially costly when the final JAR file reaches gigabytes in size. **Proposal:** Introduce a cacheable Buck action that stores a previously built JAR with all project dependencies. This cached JAR serves as the foundation for subsequent builds, where only your project's source code changes are appended. **How:** A feature that allows the CustomZipOutputStream to append files on a previous cached jar file, by incorporating additional files without the need to decompress the entire pre-existing content. The implementation transferring the data block from the previous jar, append new files to it, and update its header to include the newly added files. By implementing this feature, Buck can now utilize a cache with dependencies instead of packing it on every change. As a result, the build time for java_binary targets will be significantly reduced, leading to improved overall efficiency in the development process. Differential Revision: D57572666 fbshipit-source-id: 8ba240821b7b193e876ac97c7061da77f3eb257a
- Loading branch information
1 parent
800cfee
commit 4c937f1
Showing
2 changed files
with
138 additions
and
53 deletions.
There are no files selected for viewing
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
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