liveh2o / active_remote

Active Remote provides Active Record-like object-relational mapping over RPC. It's Active Record for your platform.
MIT License
63 stars 23 forks source link

leaking method sites on activemodel attributes #60

Closed abrandoned closed 2 years ago

abrandoned commented 7 years ago

Not sure where the leak is, but this method defines a new method when a proxy is created for the attributes that are defined https://github.com/rails/rails/blob/4-2-stable/activemodel/lib/active_model/attribute_methods.rb#L383

the value of __FILE__ is stored > 14,000 times in a single running process of synchronicity-subscriber ... this is the only spot this is called; may be because of JRuby (and not active_remote), but my assumption is active_remote because we recently refactored the methods that influence if a method is generated ... looking for additional evidence

@liveh2o @brianstien

abrandoned commented 7 years ago

may be a jruby problem ... the system gets to a steady state after defining methods on the models and doesn't continue redefining them ... so the file string being present 14,000+ times in a heap dump must be related to the internals of how method definitions are stored (but does not manifest elsewhere)

liveh2o commented 6 years ago

Is this still relevant, @abrandoned?

liveh2o commented 2 years ago

Closing since this appears related to Rails 4.2, and we're now supporting 6.0 here.