You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorGenerateExtension.kt
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -412,14 +412,14 @@ open class OpenApiGeneratorGenerateExtension(private val project: Project) {
412
412
/**
413
413
* Controls how the code generation worker is isolated from the Gradle daemon.
414
414
*
415
-
* - "process" (default): runs in a separate JVM. Metaspace is isolated from the daemon and freed
415
+
* - "classloader" (default): runs inside the Gradle daemon JVM with a separate ClassLoader. No process
416
+
* startup overhead, but generator classes accumulate in daemon Metaspace. Suitable for projects
417
+
* with very few generation tasks.
418
+
*
419
+
* - "process": runs in a separate JVM. Metaspace is isolated from the daemon and freed
416
420
* when the worker exits. Gradle reuses the worker process across tasks that share the same
417
421
* classpath, so the JVM startup cost is typically paid only once per parallel slot.
418
422
* Best for projects with many generation tasks.
419
-
*
420
-
* - "classloader": runs inside the Gradle daemon JVM with a separate ClassLoader. No process
421
-
* startup overhead, but generator classes accumulate in daemon Metaspace. Suitable for projects
422
-
* with very few generation tasks.
423
423
*/
424
424
val workerIsolation = project.objects.property<String>()
Copy file name to clipboardExpand all lines: modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt
+16-14Lines changed: 16 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -891,23 +891,14 @@ abstract class GenerateTask : DefaultTask() {
891
891
}
892
892
893
893
// Submit generation work using the configured isolation mode.
894
-
// "process" (default): worker runs in a separate JVM; Metaspace is freed after each worker daemon
894
+
// "classloader" (default): worker runs inside the Gradle daemon JVM with a separate ClassLoader; no startup
895
+
// overhead but generator classes accumulate in daemon Metaspace across all tasks.
896
+
// "process": worker runs in a separate JVM; Metaspace is freed after each worker daemon
895
897
// exits, and Gradle reuses the same worker daemon across tasks that share the same classpath,
896
898
// so startup cost is amortized — typically paid only once per parallel slot.
897
-
// "classloader": worker runs inside the Gradle daemon JVM with a separate ClassLoader; no startup
898
-
// overhead but generator classes accumulate in daemon Metaspace across all tasks.
899
-
val isolation = workerIsolation.getOrElse("process").lowercase()
899
+
val isolation = workerIsolation.getOrElse("classloader").lowercase()
0 commit comments