API calls are very slow. Combining multiple requests?
I'm working on an automatic Kanban board for GitLab, and it provides a GraphQL syntax that use GitLab API.
this is from the log:
-
https://gitlab.com/api/v3/projects/Schniz%2Fjoe-alm-test-project?private_token=MY_TOKEN&page=1&per_page=100
took 3761ms -
https://gitlab.com/api/v3/projects/895980/issues?private_token=MY_TOKEN&page=1&per_page=100&milestone_id=No%20Milestone
took 1832ms -
https://gitlab.com/api/v3/projects/895980/milestones?private_token=MY_TOKEN&page=1&per_page=100
took 3669ms -
https://gitlab.com/api/v3/projects/895980/milestones/45705?private_token=MY_TOKEN&page=1&per_page=100
took 1756ms -
https://gitlab.com/api/v3/projects/895980/issues?private_token=MY_TOKEN&page=1&per_page=100&milestone=sprint%201
took 3247ms -
https://gitlab.com/api/v3/projects/895980/merge_requests?private_token=MY_TOKEN&page=1&per_page=100
took 3259ms -
https://gitlab.com/api/v3/projects/895980/merge_requests/321541/closes_issues?private_token=MY_TOKEN&page=1&per_page=100
took 3926ms -
https://gitlab.com/api/v3/projects/895980/merge_requests/321547/closes_issues?private_token=MY_TOKEN&page=1&per_page=100
took 4150ms -
https://gitlab.com/api/v3/projects/895980/merge_requests/320114/closes_issues?private_token=MY_TOKEN&page=1&per_page=100
took 5028ms
~4s per api call is very slow.. Is there a way of making it faster? running locally is faster, but I want to use GitLab.com as the main repo.
Do you think about the way of maybe combining multiple requests into one API call like Facebook's Graph API?