metrumresearchgroup / ghpm

BSD 3-Clause Clear License
1 stars 0 forks source link

Query Performance Statistics #11

Open Blackglade opened 4 years ago

Blackglade commented 4 years ago

Will post information about Github GraphQL Query performance. All of these are done on 10 successive runs. All of these were run on this repo: https://github.com/metrumresearchgroup/rbabylon. Each sets of query tests were run with the same data to retrieve. No pagination was used so the default root node return size was capped at 100.


Query Performance
get all issues + filter ~446ms
get issues by specific milestone ~165ms
Query Performance
get first 50 comments of all issues ~666ms
get first 1 and last 3 comments of all issues ~990ms
get all comments of single issue (issue 71 was used which has 8 comments) ~78.57ms

Something to note, most of the query performance is dictated by the top-level node call count. So querying the last 100 issues and their last 50 comments is going to much slower than querying the last 50 issues and their last 100 comments. The second node count will hardly make a difference unless some specific sorting is done.

Blackglade commented 4 years ago

@dpastoor with almost a 3rd of the performance increase between just getting the first 50 and getting the first 1 and last 3. It might be worth just scrapping the bookend comments query and switching to first 50 comments. This performance increase is probably due to the graphql query having to calculate the first and last comments for each issue node.