You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We recently ran into a memory issue that I successfully traced back to the creation of an anonymous class (Class.new) based on a type that includes AttriveAttr::BasicModel.
Below is the simplest form of the scenario demonstrating the Class objects eating up memory. It looks like the Class objects are somehow being held on to - which might be ok in general, but not ideal in case of an anonymous class instance created each time.
Running this test for any class that does not involve AttriveAttr::BasicModel clears up the memory as expected.
I am not proposing that creating anonymous classes like this is a best practice. We removed this pattern from our code base - but ideally, this shouldn't have happened.
We recently ran into a memory issue that I successfully traced back to the creation of an anonymous class (
Class.new
) based on a type that includesAttriveAttr::BasicModel
.Below is the simplest form of the scenario demonstrating the Class objects eating up memory. It looks like the Class objects are somehow being held on to - which might be ok in general, but not ideal in case of an anonymous class instance created each time.
Running this test for any class that does not involve
AttriveAttr::BasicModel
clears up the memory as expected.I am not proposing that creating anonymous classes like this is a best practice. We removed this pattern from our code base - but ideally, this shouldn't have happened.
The text was updated successfully, but these errors were encountered: