Deeply nesting endpoints within multiple namespaces leads to large jumps in latency and cpu usage
@namusyaka is already working on this.
Since Oct 12, 2016.
- Dominant language
- Ruby
- Stars
- 10k
- Forks
- 1.2k
- Avg merge
- 14h 38m
- Merged PRs (30d)
- 92
Description
In my unit tests when I execute 10 simultaneous requests to a deeply nested endpoint of the form ':path_param1/namespaces1/:path_param2/namespace2/:path_param3/namespace3/namespace4/:path_param4' it takes 60 seconds to complete and CPU consumed by Ruby peaks at over 90%.
If I flatten that endpoint out and have it at the top level instead and have it named post ':path_param1/namespaces1/:path_param2/namespace2/:path_param3/namespace3/namespace4/:path_param4' do then 10 simultaneous requests to that endpoint complete in a few seconds and Ruby consumes only a few mb of CPU.
I will post some code to reproduce the issue here asap...
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.