多少时间来编译ASP.NET视图? [英] How much time to compile a view in ASP.NET?

查看:84
本文介绍了多少时间来编译ASP.NET视图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有多少时间花在编译在ASP.NET视图?

How much time is spent compiling a view in ASP.NET?

当然,我不希望任何人给我一个号码,但我认为这是有趣的有多少时间这需要,因为它可能会影响我们实现事物的方式的想法。

Of course I don't expect anyone to give me a number, but I think it's interesting to have an idea of how much time this takes because it could influence the way we implement things.

例如,如果时间显著的话,我可能会尝试把每一个结果,我需要在模型中的类的实例(刚刚创建的视图来显示这样一种方式,我甚至不持有的价值观要测试与空值对象),然后最小化到最大(嗯?)C#code的视图从而减少的编译视图所需要的时间金额。

For example, if the time is significant , then I might try to put every result that I need to display in the view in a model class instance (created just to hold the values in such a way that I don't even have to test for objects with null value) and then minimize to the maximum (uh?) the amount of C# code in the view thus decreasing the amount of time necessary to compile the view.

这是否有道理?给在这一个的一些想法。

Does this make sense? Give some thoughts on this one.

推荐答案

要我这听起来像这种方法,你正在进入痛苦的世界。知道如果每个问题之前,任何的优化。更好的是识别它们,并处理这些。也无所谓人物你在这里只是随意的。相反,创建一些网页和跟踪/ profile中找到缓慢的地区。

To me it sounds like with this approach you are entering a world of pain. Your optimizing before knowing if there are any per issues. Better is to identify them and deal with those. Also whatever "figures" you get here are just arbitrary. Instead create some pages and trace/profile to find slow areas.

从你的问题,如果你正在使用Web窗体或MVC要么是不清楚。

From your question it's not clear if you are using Web Forms or MVC either.

另外你可能会感兴趣的<一个href=\"http://stackoverflow.com/questions/516160/planning-for-efficiency-early-vs-$p$pmature-optimization\">http://stackoverflow.com/questions/516160/planning-for-efficiency-early-vs-$p$pmature-optimization

这篇关于多少时间来编译ASP.NET视图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆