【发布时间】:2016-06-24 12:01:47
【问题描述】:
我已经使用 rojar view 在 MVC 中开发了应用程序。它工作正常,但测试服务器之一在 4 秒内对页面进行排序,而在生产服务器上则需要 30-35 秒。
两个服务器上的数据库是不同的 nut 代码和两个服务器上的记录数相同
foreach (var subcategpory in Model.category.RFP_SubCategories)
{
if (subcategpory.RFP_Questions.Any(q => q.SubCategoryId == subcategpory.SubCategoryId))
{
<div class="vendor-block">
<div class="vendor-title border-bottom">
<h6>@subcategpory.SubCategory</h6>
<p>Selected:<span class="selectedQuestion" id="selectedQuestion_@subcategpory.SubCategoryId">0</span></p>
</div>
<ul class="vendor-list">
@if (Model.category.RFP_Questions != null)
{
foreach (var que in subcategpory.RFP_Questions.Where(q => q.SubCategoryId == subcategpory.SubCategoryId))
{
bool IsChecked = Model.category.RFP_SelectedQuestions.Any(sq => sq.QuestionId == que.QuestionId);
}
}
</ul>
</div>
}
}
您能否提出解决问题的任何方法和实际原因。
谢谢, 维沙尔
【问题讨论】:
标签: asp.net-mvc performance entity-framework model-view-controller