0
コントローラにfollowinfコードがあります。 とmvc5 kednoのインデックスロードでのパフォーマンスの問題
public ActionResult Index()
{
ViewData["ContractNumber"] = Mapper.Map<IList<Contract>, IList<ContractModel.contract>>(contractService.GetAll()).AsQueryable();
ViewData["ContractorName"] = Mapper.Map<IList<fContractor>, IList<ContractorModel.contractor>>(contractorService.GetAll()).AsQueryable();
ViewData["ServiceNameString"] = Mapper.Map<IList<fServiceDetail>, IList<ModelServiceDetail>>(serviceDetailsService.GetAll()).AsQueryable();
return View(ViewData);
}
マッパーの各テーブルはaroung 500〜1500のレコードを有します。
実行時にインデックスに戻るまでに時間がかかります。
パフォーマンスオンラッドを修正するコードを提案する人もいます。