Open hwellmann opened 5 years ago
raml-parser-2 is rather slow.
Generating Java code from a RAML 1.0 spec of ~6700 lines with Ramler, which is based on this parser, takes about 7500 ms.
I tried to identify the bottlenecks using the jvisualvm sampler, and I found the following hotspots:
Class.forName()
PackageModelBinding
Class.getMethod()
ModelProxyBuilder.SimpleProxy.findMatchingMethod()
ArrayList
BaseNode.findDescendantsWith()
After optimizing these hotspots in a local build, my code generator only takes 1500 ms for the same input.
I'll submit a pull request with my changes.
Aha! Link: https://mulesoft-roadmap.aha.io/features/APIRAML-42
raml-parser-2 is rather slow.
Generating Java code from a RAML 1.0 spec of ~6700 lines with Ramler, which is based on this parser, takes about 7500 ms.
I tried to identify the bottlenecks using the jvisualvm sampler, and I found the following hotspots:
Class.forName()
inPackageModelBinding
Class.getMethod()
inModelProxyBuilder.SimpleProxy.findMatchingMethod()
ArrayList
creation inBaseNode.findDescendantsWith()
BaseNode.findDescendantsWith()
with the same argumentAfter optimizing these hotspots in a local build, my code generator only takes 1500 ms for the same input.
I'll submit a pull request with my changes.
Aha! Link: https://mulesoft-roadmap.aha.io/features/APIRAML-42