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

Use a caching writer to avoid overwriting identical files #116

Merged
merged 1 commit into from
Aug 21, 2021

Conversation

gnodet
Copy link
Member

@gnodet gnodet commented Jun 9, 2021

@rfscholte
This can improve build time quite substantially. For example the maven re-build (no clean, no tests) goes from 32.8s down to 28.8s on my laptop. So that's an easy 12% benefit.
I'm going to submit a PR for the maven-resource-plugin too.

@olamy olamy merged commit 0d7c5b7 into codehaus-plexus:master Aug 21, 2021
@@ -107,7 +107,7 @@ private void generateJsonSchema( Properties parameters )
.enable( JsonWriteFeature.QUOTE_FIELD_NAMES.mappedFeature() )
.enable( JsonWriteFeature.QUOTE_FIELD_NAMES.mappedFeature() )
.disable( JsonWriteFeature.WRITE_NUMBERS_AS_STRINGS.mappedFeature() )
.createGenerator( schemaFile, JsonEncoding.UTF8 );
.createGenerator( newWriter( schemaFile.toPath() ) );
Copy link
Member

@michael-o michael-o Jan 31, 2022

Choose a reason for hiding this comment

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

This is wrong. JSON is by definition UTF-8 and nothing else. I think this breaks it.

Copy link
Member Author

Choose a reason for hiding this comment

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

I've raised #185

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

Successfully merging this pull request may close these issues.

3 participants