Use a caching writer to avoid overwriting identical files by gnodet · Pull Request #116 · codehaus-plexus/modello (original) (raw)

Conversation

@gnodet

@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.

@gnodet

michael-o

.enable( JsonWriteFeature.QUOTE_FIELD_NAMES.mappedFeature() )
.disable( JsonWriteFeature.WRITE_NUMBERS_AS_STRINGS.mappedFeature() )
.createGenerator( schemaFile, JsonEncoding.UTF8 );
.createGenerator( newWriter( schemaFile.toPath() ) );

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.

Choose a reason for hiding this comment

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

This was referenced

Feb 21, 2022

This file contains hidden or 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

[ Show hidden characters]({{ revealButtonHref }})

Labels