1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/test/support
Jean Boussier 8459c1c22f Make legacy_connection_handling a module instance variable
Ref: https://github.com/rails/rails/pull/42237
Ref: https://bugs.ruby-lang.org/issues/17763

Ruby class variables are slow, and get slower the more ancestors the class has.
And it doesn't seem likely to get faster any time soon. Overall I'm under the
impression that ruby-core consider them more or less deprecated.

But in many cases where `cattr_accessor` is used, a class instance variable
could work just fine, and would be much faster.

For Active Record this means most of the `cattr_accessor` on `ActiveRecord::Base`
could actually be `attr_accessor` on `ActiveRecord`.

I started with `legacy_connection_handling` as a proof of concept.
2021-06-10 15:00:20 +02:00
..
marshal_compatibility_fixtures Revert "Merge pull request #39759 from kamipo/marshal_load_legacy_ar_object" 2021-02-18 17:13:41 +09:00
stubs Change safe guard to check for each_pair instead of stringify_keys 2020-02-07 11:36:35 -05:00
yaml_compatibility_fixtures Fix yaml_compatibility_fixtures/rails_v1_mysql.yml's structure 2020-06-30 23:32:05 +09:00
config.rb Extract internal ActiveSupport::ConfigurationFile object 2020-02-10 02:50:12 +01:00
connection.rb Make legacy_connection_handling a module instance variable 2021-06-10 15:00:20 +02:00
connection_helper.rb Deprecate #remove_connection in favor of #remove_connection_pool 2020-01-21 16:49:20 -05:00
ddl_helper.rb
schema_dumping_helper.rb