Integrated: 2122: Minor bot optimizations for GitHub API
Erik Joelsson
erikj at openjdk.org
Fri Dec 22 14:36:05 UTC 2023
On Fri, 15 Dec 2023 22:09:37 GMT, Erik Joelsson <erikj at openjdk.org> wrote:
> I've made some minor optimizations to some GitHub interactions that I would like to integrate. They don't make a big impact on their own, but are part of a bigger effort to reduce latency in certain bots. The idea is to reduce the number of individual calls when possible, as we are limiting calls for rate limits through global locks. We spend a lot of time waiting on those locks, so reducing the number of calls can be valuable.
>
> When listing ReviewComments on GitHub, we need to fetch commit data in order to correctly generate all the file and line data for the comment. However, in most cases we don't actually need this data. I propose implementing an alternate method on PullRequest to retrieve ReviewComments as a list of regular Comment objects, without the file and line data.
>
> When listing comments of various kinds, we are often hitting pagination. The default page size on GitHub is usually 30 with 100 being the max. Our methods for listing comments always fetch all of them, so it would make sense to use the max page size to reduce the number of individual calls.
This pull request has now been integrated.
Changeset: ebe89497
Author: Erik Joelsson <erikj at openjdk.org>
URL: https://git.openjdk.org/skara/commit/ebe89497e1bba92fd0603194b434f3820514c70b
Stats: 65 lines in 3 files changed: 22 ins; 1 del; 42 mod
2122: Minor bot optimizations for GitHub API
Reviewed-by: zsong
-------------
PR: https://git.openjdk.org/skara/pull/1593
More information about the skara-dev
mailing list