f4d06f195d
We are investigating a memory leak in Sidekiq and saw the following line when comparing heap dumps over time. `Allocated IMEMO 14775 objects of size 591000/7389528 (in bytes) at: /var/www/discourse/app/jobs/onceoff/onceoff.rb:36` That line in question was doing a `.select { |klass| klass < self }` on `ObjectSpace.each_object(Class)`. This for some reason is allocating a whole bunch of `IMEMO` objects which are instruction sequence objects. Instead of diving deeper into why this might be leaking, we can just save our time by switching to an implementation that is more efficient and does not require looping through a ton of objects. |
||
---|---|---|
.. | ||
coding_style_spec.rb | ||
common_mark_spec.rb | ||
i18n_spec.rb | ||
js_constants_spec.rb | ||
middleware_order_spec.rb | ||
oj_spec.rb | ||
onceoff_integrity_spec.rb | ||
site_setting_spec.rb |