1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #35844 from kamipo/fix_fixture_loading_performance_regression

Use `execute_batch2` rather than `execute_batch` to fix performance regression for fixture loading
This commit is contained in:
Ryuta Kamizono 2019-04-04 03:55:04 +09:00 committed by GitHub
commit 9bccf4604f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 9 additions and 10 deletions

View file

@ -118,7 +118,7 @@ platforms :ruby, :mswin, :mswin64, :mingw, :x64_mingw do
gem "racc", ">=1.4.6", require: false
# Active Record.
gem "sqlite3", "~> 1.3", ">= 1.3.6"
gem "sqlite3", "~> 1.4"
group :db do
gem "pg", ">= 0.18.0"

View file

@ -278,6 +278,7 @@ GEM
image_processing (1.7.1)
mini_magick (~> 4.0)
ruby-vips (>= 2.0.13, < 3)
jar-dependencies (0.4.0)
jaro_winkler (1.5.2)
jaro_winkler (1.5.2-java)
jdbc-mysql (5.1.46)
@ -468,9 +469,7 @@ GEM
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
sqlite3 (1.3.13)
sqlite3 (1.3.13-x64-mingw32)
sqlite3 (1.3.13-x86-mingw32)
sqlite3 (1.4.0)
stackprof (0.2.12)
sucker_punch (2.1.1)
concurrent-ruby (~> 1.0)
@ -582,7 +581,7 @@ DEPENDENCIES
sidekiq
sneakers
sprockets-export
sqlite3 (~> 1.3, >= 1.3.6)
sqlite3 (~> 1.4)
stackprof
sucker_punch
turbolinks (~> 5)

View file

@ -14,7 +14,7 @@ module ActiveRecord
log(sql, name) do
ActiveSupport::Dependencies.interlock.permit_concurrent_loads do
@connection.execute_batch(sql)
@connection.execute_batch2(sql)
end
end
end

View file

@ -10,7 +10,7 @@ require "active_record/connection_adapters/sqlite3/schema_definitions"
require "active_record/connection_adapters/sqlite3/schema_dumper"
require "active_record/connection_adapters/sqlite3/schema_statements"
gem "sqlite3", "~> 1.3", ">= 1.3.6"
gem "sqlite3", "~> 1.4"
require "sqlite3"
module ActiveRecord

View file

@ -15,7 +15,7 @@ module Rails
case database
when "mysql" then ["mysql2", [">= 0.4.4"]]
when "postgresql" then ["pg", [">= 0.18", "< 2.0"]]
when "sqlite3" then ["sqlite3", ["~> 1.3", ">= 1.3.6"]]
when "sqlite3" then ["sqlite3", ["~> 1.4"]]
when "oracle" then ["activerecord-oracle_enhanced-adapter", nil]
when "frontbase" then ["ruby-frontbase", nil]
when "sqlserver" then ["activerecord-sqlserver-adapter", nil]

View file

@ -526,7 +526,7 @@ class AppGeneratorTest < Rails::Generators::TestCase
if defined?(JRUBY_VERSION)
assert_gem "activerecord-jdbcsqlite3-adapter"
else
assert_gem "sqlite3", "'~> 1.3', '>= 1.3.6'"
assert_gem "sqlite3", "'~> 1.4'"
end
end

View file

@ -68,7 +68,7 @@ module Rails
assert_file("Gemfile") do |content|
assert_match "# Use sqlite3 as the database for Active Record", content
assert_match "gem 'sqlite3', '~> 1.3', '>= 1.3.6'", content
assert_match "gem 'sqlite3', '~> 1.4'", content
end
end