mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
8459c1c22f
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. |
||
---|---|---|
.. | ||
active_record/connection_adapters | ||
activejob | ||
assets | ||
cases | ||
fixtures | ||
migrations | ||
models | ||
schema | ||
support | ||
config.example.yml | ||
config.rb |