質問編集履歴

1

詳細と試したことを追記しました。

2016/03/19 09:11

投稿

ayu
ayu

スコア212

test CHANGED
File without changes
test CHANGED
@@ -8,7 +8,11 @@
8
8
 
9
9
 
10
10
 
11
- https://gyazo.com/01508049ebd1f9fa67ac57107d1ebc43
11
+ ![参考画像](22cf181853e63faedffc6219f31ae327.png)
12
+
13
+
14
+
15
+ ![トータル時間](7a897b65748372872bc9766031c3b6cd.png)
12
16
 
13
17
 
14
18
 
@@ -111,3 +115,55 @@
111
115
  何かいい方法はありますでしょうか?
112
116
 
113
117
  よろしければご教授をお願いします。
118
+
119
+
120
+
121
+ ---
122
+
123
+ 追記事項
124
+
125
+ ```
126
+
127
+ ruby 2.2.3
128
+
129
+ rails 4.2.5
130
+
131
+ ```
132
+
133
+
134
+
135
+ 計測ツール
136
+
137
+ ```
138
+
139
+ rack-mini-profiler
140
+
141
+ ```
142
+
143
+
144
+
145
+ 調べたこと
146
+
147
+ ```
148
+
149
+ includesで事前に呼び込むようにする。
150
+
151
+ 効果はありませんでした。
152
+
153
+ 使い方が間違えていると思います。
154
+
155
+ gemのbulletにも注意されました。
156
+
157
+
158
+
159
+ - posts.includes(:cheers, sympathies).each do |post|
160
+
161
+ post.cheers.count
162
+
163
+ post.sympathies.count
164
+
165
+ ```
166
+
167
+
168
+
169
+ 試したことは上記内容になります。