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
JcwJavaSourceGenerator.GenerateContent(...) currently generates Java Callable Wrapper source content sequentially, even though each Java peer's .java file is independent. PR #10924 measurements in #10958 showed JCW generation as the dominant cold-build phase, so this is a good contained optimization candidate.
WriteJavaSourcesToDisk(...) writes the generated source list using Files.CopyIfStreamChanged(...).
Suggested implementation
Generate source content in parallel across peers.
Preserve deterministic output ordering so task outputs and tests remain stable.
Avoid sharing mutable TextWriter/generator state across workers unless it is proven thread-safe; the simplest approach is one local StringWriter per peer.
Keep the existing content-comparison write behavior.
Acceptance criteria
JCW source generation uses parallelism for independent peers.
Generated file paths/content remain deterministic and behavior-compatible with existing tests.
Existing trimmable typemap tests pass; add a focused test if ordering or thread-safety needs coverage.
Activity