哪个是更好的性能 [英] Which is better performance wise

查看:76
本文介绍了哪个是更好的性能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

选项1:< input type =textrunat =serverid =X/>

OR

选项2:< asp :Textbox id =Yrunat =server>



我尝试过:



我总是使用选项2,但它非常慢,所以任何人都可以建议我,选项1会优于选项2.我不希望MVC作为解决方案,因为应用程序已经构建了

Option 1 : <input type="text" runat="server" id="X" />
OR
Option 2 : <asp:Textbox id="Y" runat="server>

What I have tried:

I always use option 2 but its very slow so can anyone suggest me that will Option 1 be better over Option 2. I don't want MVC as an solution because application is already built

推荐答案

选项1更快,但是我非常怀疑这是导致性能问题的原因,除非你在页面上有数千个文本框(如果你这样做,那么解决方案是重新设计你的你需要确定性能瓶颈的确切位置,我怀疑它在这里。
Option 1 is quicker, however I highly doubt that is the cause of your performance woes unless you have thousands of textboxes on the page (if you do then the solution is to re-design your forms into steps). You need to determine exactly where the performance bottle neck is, I doubt it is here.


我担心最大的性能问题是 runat = server

尝试在客户端工作以获得更好的性能。
I fear the biggest performance problem is in runat="server".
try to work on client side for better performance.


这篇关于哪个是更好的性能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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