From 497250ba9cb302b3485faa7ef5c6022837da910e Mon Sep 17 00:00:00 2001 From: Mark Vieira Date: Tue, 17 Mar 2020 09:57:47 -0700 Subject: [PATCH] Improve performance of docs snippet length checkstyle rule (#53636) The multiline regex rule used to detect docs code snippets greater than 76 characters in length has considerable cost to. For the high level rest client project alone, this was taking upwards of 3 minutes. This commit updates the rule regex pattern to use non-greedy matching when appropriate which results in a lot fewer backtracks and about a 70% reduction in execution time on the high level rest client module. --- buildSrc/src/main/resources/checkstyle.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildSrc/src/main/resources/checkstyle.xml b/buildSrc/src/main/resources/checkstyle.xml index c603edc353d..cac887bc161 100644 --- a/buildSrc/src/main/resources/checkstyle.xml +++ b/buildSrc/src/main/resources/checkstyle.xml @@ -26,7 +26,7 @@ --> - +