Cache compiled API routes
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 10k
- Forks
- 1.2k
- Avg merge
- 14h 38m
- Merged PRs (30d)
- 92
Description
I noticed that it takes 5-6 seconds for our Grape API to compile all the routes (see GitLab issue https://gitlab.com/gitlab-org/gitlab-ce/issues/35208), which is especially painful in production whenever a unicorn worker is restarted. Since API routes generally don't change that much, I think there ought to be a way to load the routes from cache.
I filed https://github.com/sinatra/mustermann/issues/69 because it seems like we'd need a way to compile and serialize the data there, but perhaps there is something Grape could be doing too.
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.
Research direction
Start by investigating how Grape compiles API routes and whether the route data can be safely loaded from a cache during Unicorn worker startup. Review the linked GitLab issue and the related Mustermann issue 69 to determine the serialization dependency. Done means establishing a workable route-cache approach with appropriate validation and tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- api, backend, performance
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100