This instance will be upgraded to Heptapod 0.31.0 (final) on 2022-05-24 at 14:00 UTC+2 (a few minutes of down time)

  • James Edwards-Jones's avatar
    Extracted ProtectableDropdown to clean up Project#open_branches · 6e069db01d63
    James Edwards-Jones authored
    Makes it clear this is only used in dropdowns, instead of cluttering up Project class. Since we only care about branch names, it is also possible to refactor out a lot of the set/reject logic.
    A benchmark on Array/Set subtraction favoured using Arrays. This was with 5000 ‘branches’ and 2000 ‘protections’ to ensure a similar comparison to the commit which introduced using Set for intersection.
       array subtraction:      485.8 i/s
         set subtraction:      128.7 i/s - 3.78x slower
repository_controller.rb 1.67 KB