Reduce default value for maxPathsInChangeMessages config parameter

The maxPathsInChangeMessages controls how many owned paths should be
included into changes messages at most. Computing owned path is rather
expensive and contributes to the latency of post review. By reducing the
number of owned paths that are included by default we lower the impact
on the latency. The paths in the change messages are used for having a
more transparent UX, but also for code owner metrics. Reducing the
number of the included paths makes the metrics less precise, but since
most changes touch less than 50 files the new default value should be
still good enough.

Signed-off-by: Edwin Kempin <ekempin@google.com>
Change-Id: I3b520220c76e1f64ec7814f40f0e82d3c48ff0d4
diff --git a/java/com/google/gerrit/plugins/codeowners/backend/config/GeneralConfig.java b/java/com/google/gerrit/plugins/codeowners/backend/config/GeneralConfig.java
index ddeec46..251504a 100644
--- a/java/com/google/gerrit/plugins/codeowners/backend/config/GeneralConfig.java
+++ b/java/com/google/gerrit/plugins/codeowners/backend/config/GeneralConfig.java
@@ -69,11 +69,12 @@
   public static final String KEY_EXEMPTED_USER = "exemptedUser";
   public static final String KEY_ENABLE_IMPLICIT_APPROVALS = "enableImplicitApprovals";
   public static final String KEY_OVERRIDE_INFO_URL = "overrideInfoUrl";
-  public static final int DEFAULT_MAX_PATHS_IN_CHANGE_MESSAGES = 100;
   public static final String KEY_REJECT_NON_RESOLVABLE_CODE_OWNERS =
       "rejectNonResolvableCodeOwners";
   public static final String KEY_REJECT_NON_RESOLVABLE_IMPORTS = "rejectNonResolvableImports";
 
+  public static final int DEFAULT_MAX_PATHS_IN_CHANGE_MESSAGES = 50;
+
   private static final String KEY_ALLOWED_EMAIL_DOMAIN = "allowedEmailDomain";
 
   private final String pluginName;
diff --git a/resources/Documentation/config.md b/resources/Documentation/config.md
index 8207d33..ffa4018 100644
--- a/resources/Documentation/config.md
+++ b/resources/Documentation/config.md
@@ -407,7 +407,7 @@
         Can be overridden per project by setting
         [codeOwners.maxPathsInChangeMessages](#codeOwnersMaxPathsInChangeMessages)
         in `@PLUGIN@.config`.\
-        By default `100`.
+        By default `50`.
 
 <a id="pluginCodeOwnersMaxCodeOwnerConfigCacheSize">plugin.@PLUGIN@.maxCodeOwnerConfigCacheSize</a>
 :       When computing code owner file statuses for a change (e.g. to compute
@@ -770,8 +770,7 @@
         from parent projects.\
         If not set, the global setting
         [plugin.@PLUGIN@.maxPathsInChangeMessages](#pluginCodeOwnersMaxPathsInChangeMessages)
-        in `gerrit.config` is used.\
-        By default `100`.
+        in `gerrit.config` is used.
 
 ---