Cache Repository#ancestor? on two levels
What does this MR do?
We sometimes call this multiple times within a request for the MergeReqeustPollWidgetEntity
.
Sometimes the Gitaly call for this can take up to 10 seconds: https://log.gitlab.net/goto/01f164873d08893fb83529457a049622
Since the ancestor for a commit never changes, and the data to be stored is very small. It seems easy enough to cache this.
Related to https://gitlab.com/gitlab-com/gl-infra/infrastructure/issues/8445#note_248074620 and gitlab-com/gl-infra/scalability#64 (closed)
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry - [-] Documentation (if required)
-
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
Edited by Bob Van Landuyt