Uh oh!
There was an error while loading. Please reload this page.
[generator] Enable parallel type generation. - #447
Conversation
jonpryor
commented
Jul 18, 2019
Odd that |
jonpryor
commented
Jul 18, 2019
What have you done in terms of "stress testing" to ensure that PR #446 didn't "miss" anything? Have you tried running |
I shouldn't have included My testing is roughly what you suggest. I committed the "known good" generated output to a local git repository. I then run |
Reverts commit 2ec06c9. Revert parallel type generation. There are some deeper thread-safety issues that will have to be resolved before this can safely be enabled. These take the form of `CodeGenerator` manipulating the object model while it is writing, e.g. within [`CodeGenerator.WriteProperty()`][0]: string pname = property.Setter.Parameters [0].Name; property.Setter.Parameters [0].Name = "value"; WriteMethodBody (property.Setter, indent + "\t\t"); property.Setter.Parameters [0].Name = pname; This caused a test to sporadically fail on CI, but the pipeline is hiding test errors so it wasn't noticed. [0]: https://github.com/xamarin/java.interop/blob/master/tools/generator/Java.Interop.Tools.Generator.CodeGeneration/CodeGenerator.cs#L1437-L1440
#446 removed Cecil usage from the step that generates the type
.csfiles, which was the remaining thread-safety issue. This PR enables generating those files in parallel.This results in a nice performance win, particularly for projects binding a lot of types: