raml-org / raml-java-parser

(deprecated) A RAML parser based on SnakeYAML written in Java
Other
174 stars 121 forks source link

Performance improvements #603

Open hwellmann opened 5 years ago

hwellmann commented 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:

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