Skip to content

[optimization] GitHub: Reduce number of API calls by caching ย #16

@shevron

Description

@shevron

There are a few API calls that we tend to make again and again in the lifetime of a backend object or even over the span of multiple instantiations in the same process, that could be cached using different approaches.

A good start is probably caching the result of GitHubStorage._get_owner() (there will probably be very few owners used in a given installation) and GitHubStorage._get_repo() which can return a bunch of different repos per installation (so maybe we can cache between instantiations but using some kind of space limited MRU cache), but even caching it on the instance level in some space limited manner can be helpful as there are many calls which call it multiple times for the same repo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions