渲染页面的时间很长

时间:2011-05-16 08:49:57

标签: ruby ruby-on-rails-3 time

我网站上发生了一件奇怪的事情。直到今天,它运作良好。 昨天,我在视图中的描述中添加了auto_link,现在也在localhost中,页面需要花费大量时间进行渲染:

Completed 200 OK in 399711ms (Views: 314.5ms | ActiveRecord: 123.8ms)

我删除了auto_link,但问题仍然存在。可以做些什么? 我正在使用ruby ree 1.8.7(2011年2月)和rails 3.0.3。

这是完整的电话:

Started GET "/" for 127.0.0.1 at Mon May 16 10:34:40 +0200 2011
  SQL (0.8ms)  describe `events_humen`
  Processing by CoresController#show as HTML
  Parameters: {"id"=>"events"}
  SQL (0.8ms)  SELECT COUNT(*) FROM `users` WHERE (session_updated_at > '2011-05-16 08:39:19')
  SQL (0.7ms)  describe `cores_kinds`
  EventDate Load (49.7ms)  SELECT distinct event_dates.* FROM `event_dates` INNER JOIN `events` ON `events`.`id` = `event_dates`.`event_id` INNER JOIN `cores` ON `cores`.`resource_id` = `events`.`id` AND `cores`.`resource_type` = 'Event' INNER JOIN `cores_kinds` ON `cores_kinds`.`core_id` = `cores`.`id` INNER JOIN `kinds` ON `kinds`.`id` = `cores_kinds`.`kind_id` WHERE (day >= '2011-05-16') ORDER BY day, cores.vote desc, cores.readings desc LIMIT 30 OFFSET 0
  Event Load (1.9ms)  SELECT `events`.* FROM `events` WHERE (`events`.`id` IN (2079,1441,2421,2422,1245,2125,2489,1246,1444,1445,1247,1611,1249,1250,1251,2076,1966,1252,1253,2517,2518))
  Place Load (1.4ms)  SELECT `places`.* FROM `places` WHERE (`places`.`id` IN (1749,1485,380,4388,1234,812,1763,1213,4215,132,1325,199,1326,1327,1800,12102,1328,12214,65))
  Core Load (27.9ms)  SELECT `cores`.* FROM `cores` WHERE (`cores`.`resource_id` IN (65,1325,1326,12214,12102,4388,380,132,1213,199,1485,1763,1234,1328,1800,1749,812,4215,1327) and `cores`.`resource_type` = 'Place')
  Location Load (1.2ms)  SELECT `locations`.* FROM `locations` WHERE (`locations`.`id` IN (171,66,7,162,35,185,164,527,549,407,84,111,188,177,3361,170))
  Core Load (1.7ms)  SELECT `cores`.* FROM `cores` WHERE (`cores`.`resource_id` IN (1611,1247,1250,2518,2125,2421,1249,1445,1441,1444,2079,2517,1245,1252,2076,1246,1966,2489,2422,1251,1253) and `cores`.`resource_type` = 'Event')
  Multimedia Load (0.7ms)  SELECT `multimedias`.* FROM `multimedias` WHERE (`multimedias`.`id` IN (5059,7437,4268,789,8086,4533,4270,8121,8154,4272,8155,4294,4295,4274,5275,7598,5783,8401,4573,4530))
  Kind Load (0.9ms)  SELECT `kinds`.*, t0.core_id as the_parent_record_id FROM `kinds` INNER JOIN `cores_kinds` t0 ON `kinds`.id = t0.kind_id WHERE (t0.core_id IN (3795,3216,3220,17009,16382,16888,3218,3533,3528,3532,6020,17007,3213,3224,6016,3215,5827,16970,16889,3222,3225))
  SQL (4.5ms)  SELECT COUNT(`event_dates`.`id`) FROM `event_dates` INNER JOIN `events` ON `events`.`id` = `event_dates`.`event_id` INNER JOIN `cores` ON `cores`.`resource_id` = `events`.`id` AND `cores`.`resource_type` = 'Event' INNER JOIN `cores_kinds` ON `cores_kinds`.`core_id` = `cores`.`id` INNER JOIN `kinds` ON `kinds`.`id` = `cores_kinds`.`kind_id` WHERE (day >= '2011-05-16')
  SQL (4.2ms)  SELECT COUNT(*) FROM `event_dates`
  Kind Load (0.9ms)  SELECT `kinds`.* FROM `kinds` WHERE (type_core = 'Event') ORDER BY super_kind_it desc
Rendered cores/_ele_searched_common.html.erb (1.2ms)
Rendered cores/_ele_searched_common.html.erb (1.1ms)
Rendered cores/_ele_searched_common.html.erb (1.1ms)
Rendered cores/_ele_searched_common.html.erb (1.2ms)
Rendered cores/_ele_searched_common.html.erb (1.2ms)
Rendered cores/_ele_searched_common.html.erb (1.2ms)
Rendered cores/_ele_searched_common.html.erb (1.1ms)
Rendered cores/_ele_searched_common.html.erb (1.3ms)
Rendered cores/_ele_searched_common.html.erb (1.1ms)
Rendered cores/_ele_searched_common.html.erb (1.1ms)
Rendered cores/_ele_searched_common.html.erb (1.7ms)
Rendered cores/_ele_searched_common.html.erb (1.1ms)
Rendered cores/_ele_searched_common.html.erb (1.1ms)
Rendered cores/_ele_searched_common.html.erb (1.3ms)
Rendered cores/_ele_searched_common.html.erb (1.2ms)
Rendered cores/_ele_searched_common.html.erb (1.2ms)
Rendered cores/_ele_searched_common.html.erb (1.2ms)
Rendered cores/_ele_searched_common.html.erb (1.0ms)
Rendered cores/_ele_searched_common.html.erb (1.1ms)
Rendered cores/_ele_searched_common.html.erb (1.6ms)
Rendered cores/_ele_searched_common.html.erb (1.1ms)
Rendered cores/_ele_searched_common.html.erb (1.3ms)
Rendered cores/_ele_searched_common.html.erb (1.2ms)
Rendered cores/_ele_searched_common.html.erb (1.1ms)
Rendered cores/_ele_searched_common.html.erb (1.3ms)
Rendered cores/_ele_searched_common.html.erb (1.1ms)
Rendered cores/_ele_searched_common.html.erb (1.2ms)
Rendered cores/_ele_searched_common.html.erb (1.3ms)
Rendered cores/_ele_searched_common.html.erb (1.1ms)
Rendered cores/_ele_searched_common.html.erb (1.9ms)
Rendered events/_ele_date_searched.html.erb (209.0ms)
  Event Load (21.4ms)  SELECT distinct events.* FROM `events` INNER JOIN `cores` ON `cores`.`resource_id` = `events`.`id` AND `cores`.`resource_type` = 'Event' WHERE (date >= '2011-05-16' AND date_end <= '2011-06-15') ORDER BY cores.vote desc, cores.readings desc LIMIT 5
  Place Load (0.6ms)  SELECT `places`.* FROM `places` WHERE (`places`.`id` IN (1749,1741,417,191))
  Core Load (0.7ms)  SELECT `cores`.* FROM `cores` WHERE (`cores`.`resource_id` IN (417,1741,191,1749) and `cores`.`resource_type` = 'Place')
  Location Load (0.5ms)  SELECT `locations`.* FROM `locations` WHERE (`locations`.`id` IN (7,35,84))
  Core Load (0.7ms)  SELECT `cores`.* FROM `cores` WHERE (`cores`.`resource_id` IN (2576,1947,2191,1967,1966) and `cores`.`resource_type` = 'Event')
  Multimedia Load (1.7ms)  SELECT `multimedias`.* FROM `multimedias` WHERE (`multimedias`.`id` IN (6236,7802,5463,5783))
  Kind Load (1.0ms)  SELECT `kinds`.*, t0.core_id as the_parent_record_id FROM `kinds` INNER JOIN `cores_kinds` t0 ON `kinds`.id = t0.kind_id WHERE (t0.core_id IN (17104,5799,16534,5828,5827))
Rendered forum/_topics.erb (2.1ms)
Rendered forum/_view.html.erb (5.0ms)
Rendered _frame_top.html.erb (0.4ms)
Rendered _frame_bottom.html.erb (0.4ms)
Rendered _modal_thumb.html.erb (4.9ms)
Rendered _bottom_logo.html.erb (0.3ms)
Rendered cores/show.html.erb within layouts/application (336.6ms)
Completed 200 OK in 399711ms (Views: 314.5ms | ActiveRecord: 123.8ms)

由于

0 个答案:

没有答案