Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
githubapi: Optimize List performance when there are many notifications. #4
This is because the current implementation is far from optimal: it lists all notifications via a single GitHub REST API v3 call, then for each notification, it makes at least one API call to fetch more detailed information about that notification. It does all this completely sequentially. As a result, it can take over 15 seconds when there are 150~ GitHub notifications.
I've been putting up with it, because I've been waiting for GitHub GraphQL API v4 to add support for notifications. Then, the entire
However, on Friday, @heschik came over and asked me to check my GitHub notifications for something noteworthy. Embarrassingly, it took 15~ seconds to do so, ruining the time-sensitive humorous moment.
So, this PR optimizes performance of the
After these two changes, the
P.S. I should not have 145+ unread notifications, but that's another topic. I mostly kept them around to be able to test these changes.