Closed timhaines closed 7 years ago
This resulted in a 50-60% speed improvement in many of our API calls, especially the larger ones. 👍 🚀 🚀
Folks, I was reviewing this part of code and realized that there are couple of issues with it:
type
can be fixed in a slightly different way without sacrificing the performance:def self.type
@type ||= ....
end
def type
self.class.type
end
For posterity, here is the before profiling info where we found that the
type
method was super slow, particularly because of its use of ActiveSupport:All of this expense is basically zero'd out with this PR.