Skip to content

Improve migration order performance

Matt Kasa requested to merge mattkasa-improve-migration-order-performance into master

What does this MR do and why?

While investigating #472255 (closed) we noticed that while running a migration spec we spent 17.62% of our time in down and 17.51% was in current_version which reverse sorts the list of migrations in order to select the current one.

This MR memoizes the most expensive part of the operation which decreases the percentage of time spent in current_version from 17.51% to 1.18%.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports

Loading