以下のissueをfixするPR. Major performance regression when preloading has_many_through association · Issue #12537 · rails/rails rails/rails#12537
commitはこれ https://github.com/yuroyoro/rails/commit/b348115f1d0cc8d3aa363568b6692ad312941a91
I profiled the benchmark code that preloads has_many_through association, and found that most of time spent by