Redmine自定义字段增多后会变慢
作者:网络转载 发布时间:[ 2016/7/5 11:32:44 ] 推荐标签:Redmine 软件测试工具
问题:
在Redmine部署使用后,发现更新事务时速度慢,进行了相关试验,去掉了可能影响速度的插件,仍然很慢。以下为对比试验:
1、包含12个自定义字段的项目,更新用时2136ms,记录如下:
Started PATCH "/issues/3115" for 127.0.0.1 at 2016-07-03 10:58:36 +0800
Processing by IssuesController#update as HTML
Parameters: {"utf8"=>"?", "authenticity_token"=>"QNZR0IqhR6x6Otexs0D0w9b+2fWma/0YfiuOskbmGSQYMLB7lwQZJLB19GqANWSjh/6iubUif4l1X+E6nE8vhQ==", "form_update_triggered_by"=>"", "issue"=>{"project_id"=>"5", "tracker_id"=>"5", "subject"=>"XX项目", "description"=>"XX项目", "status_id"=>"6", "priority_id"=>"4", "custom_field_values"=>{"57"=>"", "50"=>"XX", "53"=>"", "11"=>"", "28"=>"XX", "14"=>"2016-05-18", "34"=>"2016-05-18", "51"=>"2016-07-12", "16"=>"0", "3"=>"2016-05-18", "23"=>"", "52"=>""}, "notes"=>"", "lock_version"=>"0"}, "was_default_status"=>"6", "last_journal_id"=>"", "commit"=>"提交", "next_issue_id"=>"3114", "issue_position"=>"1", "issue_count"=>"150", "id"=>"3115"}
Current user: csl (id=26)
Rendered mailer/_issue.text.erb (15.6ms)
Rendered mailer/issue_edit.text.erb within layouts/mailer (31.2ms)
Rendered mailer/_issue.html.erb (0.0ms)
Rendered mailer/issue_edit.html.erb within layouts/mailer (0.0ms)
Redirected to http://127.0.0.1:8080/issues/3115?issue_count=150&issue_position=1&next_issue_id=3114
Completed 302 Found in 2136ms (ActiveRecord: 115.6ms)
2、包含51个自定义字段的项目,更新用时5745ms,记录如下:
Started PATCH "/issues/3890" for 127.0.0.1 at 2016-07-03 10:57:07 +0800
Processing by IssuesController#update as HTML
Parameters: {"utf8"=>"?", "authenticity_token"=>"BdB8/SFFGD0lTT45NVQpA/dqUk/s/NExRrR0/orEDStdNp1WPOBGte8CHeIGIbljpmopA/+1U6BNwBt2UG07ig==", "form_update_triggered_by"=>"", "issue"=>{"status_id"=>"2", "priority_id"=>"2", "assigned_to_id"=>"", "start_date"=>"", "due_date"=>"", "custom_field_values"=>{"57"=>"", "28"=>"XXX", "16"=>"", "21"=>"", "22"=>"", "3"=>"", "23"=>"", "35"=>"", "37"=>"0", "24"=>"", "25"=>"", "26"=>"0", "38"=>"", "39"=>"", "40"=>"", "41"=>"", "42"=>"", "43"=>"", "59"=>""}, "notes"=>"", "lock_version"=>"3"}, "last_journal_id"=>"246", "commit"=>"提交", "prev_issue_id"=>"3904", "next_issue_id"=>"3883", "issue_position"=>"2", "issue_count"=>"15", "id"=>"3890"}
Current user: csl (id=26)
Rendered mailer/_issue.text.erb (31.2ms)
Rendered mailer/issue_edit.text.erb within layouts/mailer (93.6ms)
Rendered mailer/_issue.html.erb (15.6ms)
Rendered mailer/issue_edit.html.erb within layouts/mailer (15.6ms)
Rendered mailer/_issue.text.erb (15.6ms)
Rendered mailer/issue_edit.text.erb within layouts/mailer (31.2ms)
Rendered mailer/_issue.html.erb (0.0ms)
Rendered mailer/issue_edit.html.erb within layouts/mailer (15.6ms)
Redirected to http://127.0.0.1:8080/issues/3890?issue_count=15&issue_position=2&next_issue_id=3883&prev_issue_id=3904
Completed 302 Found in 5745ms (ActiveRecord: 66.8ms)
初步看来,解决办法是减少跟踪标签的自定义字段。
解决方案:
1、删除事务跟踪者,可以明显降低事务提交后的等待周期。因为事务更新需要发送邮件给跟踪者,而这个过程比较耗时。
2、减少自定义字段数。
相关推荐
更新发布
功能测试和接口测试的区别
2023/3/23 14:23:39如何写好测试用例文档
2023/3/22 16:17:39常用的选择回归测试的方式有哪些?
2022/6/14 16:14:27测试流程中需要重点把关几个过程?
2021/10/18 15:37:44性能测试的七种方法
2021/9/17 15:19:29全链路压测优化思路
2021/9/14 15:42:25性能测试流程浅谈
2021/5/28 17:25:47常见的APP性能测试指标
2021/5/8 17:01:11