代码在: http://pastebin.com/r7kzbr3t 访问日志:
Started GET "/" for 127.0.0.1 at 2012-12-17 23:39:21 +0800 Processing by TopicsController#index as HTML User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1 Topic Load (0.2ms) SELECT "topics".* FROM "topics" LIMIT 12 OFFSET 0 Item Load (0.2ms) SELECT "items".* FROM "items" WHERE "items"."topic_id" = 2 ORDER BY item_votes_count desc LIMIT 9 (0.2ms) SELECT COUNT(*) FROM "topics" Rendered topics/index.html.erb within layouts/application (2047.6ms) Completed 200 OK in 2068ms (Views: 2056.1ms | ActiveRecord: 0.7ms)
View 有性能问题,用 Rack-mini-profiler 手动追踪,发现性能问题出在 CarrierWave 生成图片 URL 的地方,大家帮忙看看,怎么改或者怎么继续追踪下去?
CarrierWave 的 storage 用的是七牛。