michael-o commented on a change in pull request #631: URL: https://github.com/apache/maven/pull/631#discussion_r762957286
########## File path: maven-caching-extension/src/site/markdown/CACHE-PERFORMANCE.md ########## @@ -0,0 +1,107 @@ +<!--- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +# Performance Tuning + +Various setup options which affect cache performance. + +## General notes + +Tuning of cache performance could reduce both resources consumption and build execution time but that is not guaranteed. +In many scenarios build time of invalidated (changed) projects could be dominating in overall build time. Performance +wins achieved by a faster cache engine might not correlate with final build times in straightforward way. As usual with +performance, effect of performance optimizations should be carefully measured in real build like scenarios. + +## Hash algorithm selection + +By default, cache uses SHA-256 algorithm which is sufficiently fast and provides negligible probability of hash +collisions. In projects with large codebase, performance of hash algorithms becomes more important and in such +scenarios [XX](https://cyan4973.github.io/xxHash/) or XXMM (memory mapped files) hashing algorithms provide better +performance. + +```xml + +<hashAlgorithm>XX</hashAlgorithm> +``` + +or + +```xml + +<hashAlgorithm>XXMM</hashAlgorithm> +``` + +## Filter out unnecessary/huge artifacts + +Price of uploading and downloading from cache of huge artifacts could be significant. In many scenarios assembling war Review comment: WAR -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
