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
rake-mini-profiler has an profile-gc option which exposes finer memory allocation details. Most notability is that it shows the classes of the objects. This can be extracted using:
ObjectSpace.each_object.map{ |x| x.class.name}
This code will enumerate over all the objects in the ObjectSpace. From this we can more accurately store the number of objects from specific classes.
As a part of this improvement we should improve the way we store the individual object types in the ObjectSpaceStats. As we will be encountering dynamic object types we should instead of using fixed instance variables (i.e., string_count_collection), we should have an object_class_counts:
rake-mini-profiler
has anprofile-gc
option which exposes finer memory allocation details. Most notability is that it shows the classes of the objects. This can be extracted using:This code will enumerate over all the objects in the
ObjectSpace
. From this we can more accurately store the number of objects from specific classes.As a part of this improvement we should improve the way we store the individual object types in the
ObjectSpaceStats
. As we will be encountering dynamic object types we should instead of using fixed instance variables (i.e.,string_count_collection
), we should have anobject_class_counts
:This should also simplify some of the verbosity of the source and specs.
The text was updated successfully, but these errors were encountered: