部件
. 性能
. 伸缩性
. 分离商务逻辑和页面表现
. 被asp或其他环境重用
. 事务处理
. 类型安全
. 存取操作系统特性
. 保护知识产权
. 在下列情况下使用server.createobject:
. mts事务处理
. 上下文安全性
. asp内部部件
. onstartpage、onendpage
. 使用<object runat=server>延迟对象初始化
. 是否保存到session或者application变量中
性能
. response缓冲:response.buffer=true
. 关闭connection并:set connection=nothing
. 使用局部变量
. 用<object >代替server.createobject
. 不要使用session和application变量
. 不要将com对象存储在session或者application变量中
. 关闭脚本调试
. 避免重复的字符串相加
. 在费时的页面顶端使用response.isclientconnected
. 使用msmq
. 不要在session或者application中存储大数组
. 不要redim 数组
. 将集合类型的对象赋给临时变量
. 减小微处理器的最大线程数(运行regedt32,在hkey_local_machine\system\ currentcontrolset\services\w3svc\asp\parameters,增加processorthreadmax,减小这个值,看看性能的变化;或者增大这个值。)
. 设置aspscriptenginecachemax,使它等于processorthreadmax*cpu个数。缺省的是30;(在系统路径下:\system32\.netsrv/adminisamples下,键入adsutil.vbs,设置/w3svc/aspscriptenginecachemax);
. 减少session.timeout;
. 在mmc中,设置asp应用程序缓冲为有效。
把某些工作交给客户端:
. css、dhtml
. xml
. rds
. remote scripting
. xmlhttp
. 客户端验证
. 减小文件大小
. 尽可能避免https和ssl
. 使用response.end测试性能
数据库
. 减少数据库存取访问;
. 缓存变换后的结果;
. 使用odbc连接池和oledb资源池;
. 使用系统dsn或者非dsn,不要使用dsn或者文件dsn;
. 使ado运行在双线程模式(both-threaded):makefre.bat;
. 使用ado的field对象;
. getstring或者getrows比较快;
. rds和xml把负载嫁到客户端;
. 不要使用select *,把字段写出来;
. 尽量使用sq. server 7,不要使用access;
. 使用sq. server的特性:存储过程、job、join、sort、group
. 使用sq. analysis,优化sql的性能
. 使用索引
. 本地使用name-pipes,远程使用sockets
. 准确地指定command type
iis 5的新特性
. 可靠的重新启动
. asp性能提高
. server.transfer比server.redirect更好
. server.execute
. server.getlasterror
Java Asp PHP .Net XML C/C++ CGI VB Jsp J2ee J2se J2me EJB Servlet Tomcat Resin Struts Weblogic Eclipse ANT GUI JMS Web servise IDEA Webphere Hibernate Spring Jboss Applet Swing Socket Javamail Perl Ajax P2P 安全 模式 框架 测试 开源 游戏
Windows XP Windows 2000 Windows 2003 Windows Me Windows 9.x Linux UNIX 注册表 操作系统 服务器 应用服务器