一个疑惑
来源:互联网 发布:centos 网卡dhcp配置 编辑:程序博客网 时间:2024/04/29 00:19
学习ASP.NET有些时候了,对于每次的首次运行时的挺慢的速度都没有特别在意。然后在看书时看到有这么一段:
The first time you access the ASP.NET page ... the most remarkable thing you will see differentiating it from the traditional ASP version is the amount of time it takes for the page to load. It is slower. Quite a bit slower, in fact. Any subsequent access to that page, however, will be markedly faster. The overhead you will see on the first access is the launching of the ASP.NET worker process plus the parsing and compilation of the .aspx files into an assembly.
这段话中说到的asp.net worker process就是aspnet_wp.exe。在任务管理器中是可以看到这个进程的。只是不明白,asp.net与传统的asp之间的一个显著的差别就是asp.net的页面是需要首先编译才能运行的。这就是我在项目的bin目录中总可以看到一个.dll文件。那么首次调用的开销来自哪里?加载aspnet_wp的开销吗?这段话解开了我的疑惑:
...once a page is accessed for the first time (or any page within a particular directory is accessed), subsequent rendering of that page is serviced by executing compiled code.
这让我想起另外一个服务器端的脚本语言JSP来了。.jsp也是在第一次被调用时被编译成一个applet类。所以也会象上面说到的那样第一次调用时会明显感觉到速度的延迟。而接下来的调用将会是速度如飞了。不过在tomcat中会有一个临时目录来存放编译生成的.class,IIS中这个编译后的页面文件又是存放在哪儿呢。另外既然如此,那又为什么asp.net必须先编译才能使用?不明白。
- 一个疑惑
- 一个疑惑
- 编程中的一个疑惑
- 菜鸟的一个疑惑
- 一个小疑惑
- 一个关于tomcat的疑惑??
- 关于volatile的一个疑惑
- 自己一个疑惑的问题
- 求助一个排序的疑惑
- 一个不完全恢复的疑惑?
- 百钱百鸡问题的一个疑惑
- vector使用中的一个疑惑
- win32api的一个小疑惑
- 一个关于kylin的疑惑
- 疑惑
- 疑惑
- 疑惑
- 疑惑
- 邵凯:用友的程序员文化
- 今天编程挺顺利,搞懂了xmlhttp的不刷新技术
- Delphi入门2==PASCAL
- blog启用
- 谁来送“英格兰”
- 一个疑惑
- 精华ASP代码(CSDN)
- Asp生成系形码
- Servlet API——GenericServlet类的简述
- ADOQuery的Parameter问题
- 奇妙的图片
- 我的测试
- 长江堤防隐蔽工程“黑洞”惊人
- 终于有了自己的Blog!