Ruby / Rails garbage collection

前端 未结 2 1698
旧时难觅i
旧时难觅i 2021-01-05 06:28

Since http is stateless, every request to an app creates a new object. How does Rails clean up the unused objects / how frequently?

2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-05 07:03

    If you are interested in this you should check out the blog series about copy-on-write garbage collection by the Phusion team and their efforts to improve on the default ruby gc scheme in Ruby Enterprise Edition.

    http://izumi.plan99.net/blog/index.php/2007/04/05/saving-memory-in-ruby-on-rails/

    Other links in the series here:

    http://www.rubyenterpriseedition.com/faq.html

提交回复
热议问题