Improve server performance, specifically API requests
Opened this issue · 11 comments
some requests take 12s
2017-08-16T04:53:47.239591+00:00 heroku[router]: at=info method=GET path="/measures" host=undp-sadata-staging.herokuapp.com request_id=8b30a393-77b4-4f79-b16f-5d1a62e01b68 fwd="210.246.55.14" dyno=web.1 connect=0ms service=12698ms status=200 bytes=369010 protocol=https
While individual requests for our "larger" tables (eg measures, 250 rows) take "only" ~2.5s, when requesting multiple tables concurrently the same table may take ~12s
While the download time appears reasonable , I wonder @barancw if and how we can reduce the waiting time?
@barancw have merged recent changes from production into master. While there appears to be some performance gain (requests no longer exceed 30s when they time out), still measures table takes 20s to load
@barancw should default_scope { includes(:versions) }
be also added to other models (currently added for recommendations and categories only)?
This gives significant performance gain (~half). Still API request times are not acceptable so we will need to investigate