This repository has been archived by the owner on Jan 29, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#474] Improve /search endpoint performance
Using `res.json()` calls to `JSON.stringify()` on the response. As we're getting the response from ElasticSearch, all fields are already converted to JSON (there're no Date classes, for example), so there's no need to call `JSON.stringify()`. That reduces the response time in about 50%. You can check by using: ab -n 1000 -c 50 http://localhost:10010/v1/search With and without this patch. opentrials/opentrials#474
- Loading branch information