RFR: 2122: Minor bot optimizations for GitHub API [v2]

Zhao Song zsong at openjdk.org
Tue Dec 19 16:21:19 UTC 2023


On Tue, 19 Dec 2023 13:34:03 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.
>
> Erik Joelsson has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Method private

Marked as reviewed by zsong (Reviewer).

-------------

PR Review: https://git.openjdk.org/skara/pull/1593#pullrequestreview-1789252774


More information about the skara-dev mailing list