Commit 8df74d55 authored by Stan Hu's avatar Stan Hu

Merge branch 'tc-geo-test-rake-tasks' into 'master'

Memoize migration files per migrations paths

Closes #3701

See merge request gitlab-org/gitlab-ee!3147
parents 2c466dee 63cba94c
...@@ -10,7 +10,8 @@ if Rails.env.test? ...@@ -10,7 +10,8 @@ if Rails.env.test?
# it reads + parses `db/migrate/*` each time. Memoizing it can save 0.5 # it reads + parses `db/migrate/*` each time. Memoizing it can save 0.5
# seconds per spec. # seconds per spec.
def migrations(paths) def migrations(paths)
(@migrations ||= migrations_unmemoized(paths)).dup @migrations ||= {}
(@migrations[paths] ||= migrations_unmemoized(paths)).dup
end end
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment