Simply enabling GC::Profiler should not result in poor performance, but the question is what you plan to do with it.
Compare it with Rails.config.log_level . If you set the level too high (for example :notice ), it needs to write many files to the log file, which will lead to a significant increase in I / O than is necessary, and, thus, to a decrease in performance. This is why the logger is set to :debug during production to minimize I / O.
So, if you turn on GC::Profiler and just ask for specific results in emergency scenarios, then I donβt believe that the problem should be the problem, itβs when you start to abuse the profiler that things can start to slow down.
but this applies to everything from overuse of database queries, to overuse of complex code to overuse of images, etc.
JeanMertz
source share