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

Don't write file if content is identical #899

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

henrikno
Copy link

@henrikno henrikno commented Jan 4, 2019

I noticed we were recompiling some modules even without doing any changes, and traced it back to files generated by immutables that changed the mtime of the files. This PR attempts to speed up incremental compiles by not writing the file if the content is already the same.

@elucash
Copy link
Member

elucash commented Jan 14, 2019

@henrikno thank you for the PR! very clever solution. Sorry for the delay, I've seen this but only now got a chance to look into. So while I definitely see the benefits, the other side of this is that there should be an impact for any other usage (on this later) as reading the whole files and running them thru equals might have some performance impact that I'm yet to estimate. I'm interested to know the specifics of incremental compilation (was it just javac, or maven, gradle or something else). Is it possible to do this only when incremental compilation is executed? (I know this might be hard to answer)

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.

None yet

2 participants