简体   繁体   English

Mvc RenderAction性能与RenderPartial

[英]Mvc RenderAction performance vs RenderPartial

嗨,我想知道mvc C#的渲染操作是否与直接在我的评论中调用part一样有效,如果不是,效率如何低下。

RenderAction will certainly be slower than RenderPartial . RenderAction RenderPartial慢。 The difference will depend on how much additional work your child action is performing relative to the parent action. 差异将取决于您的子级操作相对于父级操作执行的额外工作量。 For a very simple child action the difference should be pretty small (few % points slower). 对于非常简单的儿童操作,差异应该很小(慢几个百分点)。 Without knowing your particular application it's hard to tell. 不知道您的特定应用程序就很难分辨。 If you are worried about performance you should do some measurements. 如果您担心性能,则应进行一些测量。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM