New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Very slow startup with large number of endpoints #1813
Comments
Same issue here. The issue is not so much about the number of endpoints but the number of apib files. It can be reproduced by creating many copies of a single apib file. See results I got (tests are run in --dry-run mode to eliminate unnecessary noise): Number of copied apib files, Startup time Replacing clone method used in this line with lodash.clone or lodash.cloneDeep results in similar time improvement - from 5min to a couple of seconds. |
We've been experiencing very slow startup times with Dredd with our API recently. Typically it takes around 5 minutes (on a Macbook Pro) before Dredd even starts running the tests. This is for an API with around 83 paths/endpoints.
I've tracked the performance issue down to this line of code that does a deep clone of the whole API representation.
By swapping this line out for a direct assignment, the time to run
dredd --names
drops from around 5 minutes to 10 seconds!Is this full clone definitely required? And if it is, are there any alternatives that could be used - ie. cloning only necessary elements of the object; modifying the options passed to clone; or using a different clone library/mechanism?
The text was updated successfully, but these errors were encountered: