| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit bdc1d329d4eea823d07cf010064bd19c07099ff3.
Before:
Calculating -------------------------------------
22.000 i/100ms
-------------------------------------------------
229.700 (± 0.4%) i/s - 1.166k
Total Allocated Object: 9939
After:
Calculating -------------------------------------
24.000 i/100ms
-------------------------------------------------
246.443 (± 0.8%) i/s - 1.248k
Total Allocated Object: 7939
```
begin
require 'bundler/inline'
rescue LoadError => e
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler'
raise e
end
gemfile(true) do
source 'https://rubygems.org'
# gem 'rails', github: 'rails/rails', ref: 'bdc1d329d4eea823d07cf010064bd19c07099ff3'
gem 'rails', github: 'rails/rails', ref: 'd2876141d08341ec67cf6a11a073d1acfb920de7'
gem 'arel', github: 'rails/arel'
gem 'sqlite3'
gem 'benchmark-ips'
end
require 'active_record'
require 'benchmark/ips'
ActiveRecord::Base.establish_connection('sqlite3::memory:')
ActiveRecord::Migration.verbose = false
ActiveRecord::Schema.define do
create_table :users, force: true do |t|
t.string :name, :email
t.boolean :admin
t.timestamps null: false
end
end
class User < ActiveRecord::Base
default_scope { where(admin: true) }
end
admin = true
1000.times do
attributes = {
name: "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
email: "foobar@email.com",
admin: admin
}
User.create!(attributes)
admin = !admin
end
GC.disable
Benchmark.ips(5, 3) do |x|
x.report { User.all.to_a }
end
key =
if RUBY_VERSION < '2.2'
:total_allocated_object
else
:total_allocated_objects
end
before = GC.stat[key]
User.all.to_a
after = GC.stat[key]
puts "Total Allocated Object: #{after - before}"
```
|
|\ |
|
| | |
|
| | |
|
|/ |
|
|\ |
|
| | |
|
|\ \
| | |
| | | |
Removes unnecessary comments from i18n validations tests [ci skip]
|
|/ /
| |
| |
| |
| |
| | |
These comments do not add a lot to the readability, grepability or
overall understanding of the tests, therefore I believe they can be
safely removed.
|
|\ \
| | |
| | | |
fix class name typo [ci skip]
|
|/ / |
|
|\ \
| | |
| | |
| | |
| | | |
mcfiredrill/contributing-to-rails-bugs-arent-fixes
[ci skip] change sentence about reporting bugs in contributing guide
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
I think I know what this sentence is trying to say, but the sentence
didn't really make sense, bugs don't fix things! How about this take on
it? :sweat_smile:
|
|\ \ \
| | | |
| | | | |
Improve duplicable documentation [ci skip]
|
| |/ / |
|
|\ \ \
| | | |
| | | | |
Remove the reference to mocha in activemodel
|
|/ / /
| | |
| | |
| | |
| | | |
Activemodel is no longer dependent on mocha, so we can make the comments
more generic.
|
| | |
| | |
| | |
| | | |
constant loading should be thread safe now, so lets remove this
|
| | | |
|
|\ \ \
| | | |
| | | | |
Concurrent load interlock (rm Rack::Lock)
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
We can't actually lean on Rack::Lock's implementation, so we'll just
copy it instead. It's simple enough that that's not too troubling.
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
We don't need to fully disable concurrent requests: just ensure that
loads are performed in isolation.
|
| | | |
| | | |
| | | |
| | | | |
See 2f26f611 for more info.
|
| | | |
| | | |
| | | |
| | | | |
Also fix Minitest constant reference.
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
PATH_INFO is already set, so this branch will never execute.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
we were already generating a path in the previous code (it was just not
returned), so lets just use the already computed path to popluate the
PATH_INFO header
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
Since we only work with new instances, these ivars will not be set.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
We should call the setter on `path_parameters` so that we know the hash
will only contain the values that we've set.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
I'd like to put all env mutations together so we can understand how to
change this code to call `call` on the controller
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Since parameters are converted to a query string, they will
automatically be turned in to strings by the query parser
|
| | | |
| | | |
| | | |
| | | |
| | | | |
non_path_parameters is used internally (it never escapes this method) so
we should be able to safely use a regular hash.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
since we are serializing parameters, we don't need to do all the dup
checks on each object.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
We should roundtrip the parameters through their respective encoders /
decoders so that the controller will get parameters similar to what they
actually get in a real world situation
|
|\ \ \ \
| | | | |
| | | | | |
Require yaml for time_with_zone isolation test
|
|/ / / /
| | | |
| | | |
| | | |
| | | | |
Same fix as 109e71d2bb6d2305a091fe7ea96d4f6e9c7cd52d but after
mocha got removed in 2f28e5b6417fd4e5d6060983b36262737558b613.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
pass in the instance variable to start decoupling the meat of the parser
from the instance of the middleware
|
| | | |
| | | |
| | | |
| | | |
| | | | |
We will always make an assignment to the env hash and eliminate a
conditional
|
| | | | |
|
|\ \ \ \
| |_|/ /
|/| | | |
active_support/indifferent_access: fix not raising when default_proc does
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
If we only deal with proc objects, then we can eliminate type checking
in the parameter parsing middleware
|