Skip to content

Commit 044d152

Browse files
authored
LUCENE-9928: speed up analysis/icu regeneration (#82)
The compilation of the library is slow, disable optimization as it doesn't speed up our usage of the gennorm2 tool. Use better heuristic for make parallelism (tests.jvms rather than just hardcoded value of four).
1 parent 2c43f57 commit 044d152

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

gradle/generation/icu.gradle

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ configure(project(":lucene:analysis:icu")) {
200200
executable "tar"
201201
workingDir icuBuildDir
202202
args = [
203-
"-zxvf",
203+
"-zxf",
204204
icuSrcTgz
205205
]
206206
}
@@ -210,6 +210,8 @@ configure(project(":lucene:analysis:icu")) {
210210
executable "sh"
211211

212212
workingDir icuSrcDir
213+
environment("CFLAGS", "-O0")
214+
environment("CXXFLAGS", "-O0")
213215
args = [
214216
"configure",
215217
"--prefix=${icuSrcDir}",
@@ -221,7 +223,7 @@ configure(project(":lucene:analysis:icu")) {
221223
executable "make"
222224
workingDir icuSrcDir
223225
args = [
224-
"-j4"
226+
"-j${propertyOrDefault('tests.jvms', '4')}"
225227
]
226228
}
227229

@@ -300,4 +302,4 @@ configure(project(":lucene:core")) {
300302
}
301303

302304
regenerate.dependsOn wrapWithPersistentChecksums(generateEmojiPropertiesInternal)
303-
}
305+
}

0 commit comments

Comments
 (0)