Skip to content

Optimizations for CommitReferenceFilter

Vasilii Iakliushin requested to merge optimize_commit_reference_filter into master

What does this MR do and why?

Contributes to #360578 (closed)

Problem

Commit detection in CommitReferenceFilter can lead to high CPU consumption.

There are following reasons for that:

  1. We create substrings from commit ids even if they have the same length
  2. We iterate over the hash list of commits to find the matching commit..

Solution

Optimize commit matching logic

Screenshots or screen recordings

High CPU consumption by shas_eql? method

Screenshot_2022-04-27_at_13.59.58

Before After
Screenshot_2022-04-27_at_13.35.20 Screenshot_2022-04-27_at_13.37.50

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Vasilii Iakliushin

Merge request reports

Loading