- 16 7月, 2015 2 次提交
-
-
由 Rafael Mendonça França 提交于
Revert "Revert "Reduce allocations when running AR callbacks.""
-
由 Guo Xiang Tan 提交于
This reverts commit bdc1d329. 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: 'bdc1d329' gem 'rails', github: 'rails/rails', ref: 'd2876141' 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}" ```
-
- 15 7月, 2015 6 次提交
-
-
由 Robin Dupret 提交于
[ci skip] add note for individual stub creation
-
由 Aditya Kapoor 提交于
-
由 Aaron Patterson 提交于
Rack [already implements `redirect?` on the response object](https://github.com/rack/rack/blob/1569a985e17d9caaf94d0e97d95ef642c4ab14ba/lib/rack/response.rb#L141) so we don't need to implement our own.
-
由 Rafael Mendonça França 提交于
-
由 Rafael Mendonça França 提交于
It is already on Active Support
-
由 Aaron Patterson 提交于
Replace `ActiveSupport::Concurrency::Latch` with `Concurrent::CountDownLatch` from concurrent-ruby.
-
- 14 7月, 2015 11 次提交
-
-
由 Rafael Mendonça França 提交于
Change AC::TestResponse to AD::TestResponse
-
由 Aaron Patterson 提交于
We want to treat the response object as if it's a real response object (not a test object), so we should only call methods that are on the superclass.
-
由 Prem Sichanugrist 提交于
ActionController::TestResponse was removed in d9fe10cb and caused a test failure on Action View as its test case still refers to it.
-
由 Kasper Timm Hansen 提交于
make test runner work correctly inside engine
-
由 Aaron Patterson 提交于
We shouldn't depend on specific methods imlemented in the TestResponse subclass because the response could actually be a real response object. In the future, we should either push the aliased predicate methods in TestResponse up to the real response object, or remove them
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
由 Robin Dupret 提交于
[ci skip] docs: making clear that perform_caching has a limited impact
-
由 Rafael Mendonça França 提交于
This will save Travis some precious resource since it will not need to run 18 jobs for these Ruby implementations on every push or pull request. We do care about these implementations but we should fix the build locally before having it running on travis. We would love to have someone working on this but right now it is not our reality.
-
由 Jerry D'Antonio 提交于
The concurrent-ruby gem is a toolset containing many concurrency utilities. Many of these utilities include runtime-specific optimizations when possible. Rather than clutter the Rails codebase with concurrency utilities separate from the core task, such tools can be superseded by similar tools in the more specialized gem. This commit replaces `ActiveSupport::Concurrency::Latch` with `Concurrent::CountDownLatch`, which is functionally equivalent.
-
由 antoine.lizee 提交于
-
- 12 7月, 2015 10 次提交
-
-
由 Kasper Timm Hansen 提交于
fix typo in caching guide [ci skip]
-
由 Anton Chuchkalov 提交于
-
由 yuuji.yaginuma 提交于
-
由 Claudio B. 提交于
Removed usage line docs [ci skip]
-
由 Julio Lopez 提交于
-
由 Godfrey Chan 提交于
-
由 Godfrey Chan 提交于
-
由 Godfrey Chan 提交于
-
由 Godfrey Chan 提交于
-
由 Vijay Dev 提交于
-
- 11 7月, 2015 11 次提交
-
-
由 Abdelkader Boudih 提交于
Removes unnecessary comments from i18n validations tests [ci skip]
-
由 Zamith 提交于
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.
-
由 Kasper Timm Hansen 提交于
fix class name typo [ci skip]
-
由 yuuji.yaginuma 提交于
-
由 Xavier Noria 提交于
[ci skip] change sentence about reporting bugs in contributing guide
-
由 Kasper Timm Hansen 提交于
Improve duplicable documentation [ci skip]
-
由 Claudio B. 提交于
Remove the reference to mocha in activemodel
-
由 Tony Miller 提交于
-
由 Zamith 提交于
Activemodel is no longer dependent on mocha, so we can make the comments more generic.
-
由 Aaron Patterson 提交于
constant loading should be thread safe now, so lets remove this
-
由 Julio Lopez 提交于
-