App_Code和bin之间在性能上有区别吗? [英] Is there a performance difference between App_Code and bin?

查看:85
本文介绍了App_Code和bin之间在性能上有区别吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

两种可能的情况:您的Web代码位于 App_Code 中的类,模块等的集合中;或将所有内容编译成在 bin 中引用的程序集.该代码特定于此Web应用程序,因此可以忽略有关共享的问题.

这两种情况之间在性能上有有意义的区别吗?

Two possible scenarios: your web code exists in a collection of classes, modules, etc. sitting in App_Code; or everything is compiled into an assembly that is referenced in bin. The code is specific to this web app, so questions about sharing can be put aside.

Is there a meaningful performance difference between these two situations?

推荐答案

根据我的经验,我发现编译后的部署版本与xcopy''d部署版本的性能没有区别,除了第一个请求.

一旦将其加载到IIS中,它就存在于内存中,而且我还没有观察到任何变化(我们一次切换了大约150个同时用户的站点,而且似乎没有任何区别. ..不确定是否可以缩放).

如果在编译/发布到发布模式还是调试模式,则性能上的最大差异可能是.

干杯,
-詹姆斯
In my experience I have seen no difference with the compiled vs xcopy''d versions of deployment for performance, other than on the first request.

Once it''s loaded into IIS, it''s there in memory and I haven''t observed a change (we switched a site once with about 150 simultaneous users and there didn''t seem to be any difference at all...not sure if that scales).

Your biggest difference in performance will likely be if you compile/publish to release mode versus debug mode.

Cheers,
-James


这篇关于App_Code和bin之间在性能上有区别吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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