Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile generated classes withoug debug info #197

Closed
wants to merge 1 commit into from

Conversation

jvassev
Copy link
Contributor

@jvassev jvassev commented Nov 1, 2017

Addressing #110.
Just by not emitting debug symbols for the generated classes 200k can be saved.
The price to pay is recompiling the generated classes twice.

object       | before    | after     | savings (bytes)
------------------------------------------------------
class files  | 2,431,199 | 1,793,522 | 637677
caffeine.jar |   816,949 | 1,009,405 | 192456

@ben-manes
Copy link
Owner

Oh, that is an clever hack! Thank you!

@ben-manes ben-manes closed this Nov 1, 2017
@jvassev jvassev deleted the no-debug branch November 1, 2017 19:49
source = sourceSets.gen.java.srcDirs
destinationDir = compileJava.destinationDir
options.debug = false
options.incremental = false
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm reworking this so that the compilation process doesn't overwrite the files (causes cache busting, harder to detect malicious supply chain attacks). By chance do you remember why incremental was false?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants