ASP性能 [英] ASP Performance

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

问题描述

我已经阅读了大量关于ASP性能的文章,而不仅仅是我可以算。我b $ b看到有冲突的信息,所以我自己做了一些测试。


getstring和getrows实际上比记录集循环更快。

但是,我已经在循环中读到了Do While ...循环是最快的并且

对于...接下来最慢但我的测试证明不是这样。


我已经测试过了:

做...循环

一边做......循环

做直到...循环

虽然... Wend

For ... Next


我没想到我除非我使用了

集合或数组,否则我可以使用For ...进行准确的测试。


我也看到有关字符串连接的冲突信息和

Response.Write


这样更好吗?


dim str

str = str& 这个

str = str& 那个

str = str& 这个和那个

Response.Write str


或者这个?


dim str
Response.Write" this"

Response.Write"

Response.Write" this and That"


我也看到了加速最后一个:


响应

。写这个

。写那个

。写这个和那个

结束


是否有可靠的性能测试可供审核?

它是否因语言而异? ASP:VBscript,ASP:JScript,C / C ++,Delphi,

VB,C#


-

Roland Hall

/ *这些信息的分发是希望它有用,但

没有任何保证;甚至没有适销性的暗示保证

或特定用途的适用性。 * /

Technet脚本中心 - http:// www .microsoft.com / technet / scriptcenter /

WSH 5.6文档 - http://msdn.microsoft.com/downloads/list/webdev.asp

MSDN Library - http://msdn.microsoft.com/library/default.asp

I''ve read numerous articles, more than I can count, on ASP performance. I
see conflicting information so I did some tests on my own.

getstring and getrows are actually faster than recordset looping.

However, I''ve read in looping that Do While...Loop is the fastest and
For...Next the slowest but my tests prove otherwise.

I''ve tested:
Do...Loop
Do While...Loop
Do Until...Loop
While...Wend
For...Next

I didn''t think I could do an accurate test with For...Each unless I used a
collection or an array.

I also see conflicting information on string concatenation and
Response.Write

Is this better?

dim str
str = str & "this "
str = str & "that "
str = str & "this and that"
Response.Write str

or this?

dim str
Response.Write "this "
Response.Write "that "
Response.Write "this and that"

I''ve also seen to speed the last one up:

with Response
.Write "this "
.Write "that "
.Write "this and that"
end with

Are there reliable performance tests that can be reviewed?
Does it vary between languages? ASP:VBscript, ASP:JScript, C/C++, Delp
VB, C#

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp

推荐答案

Roland Hall写道:
Roland Hall wrote:
这样更好吗?

dim str
str = str& 这个
str = str& 那个
str = str& 这个和那个
Response.Write str

或者这个?

dim str
Response.Write" this"
Response.Write"
Response.Write" this and that"
Is this better?

dim str
str = str & "this "
str = str & "that "
str = str & "this and that"
Response.Write str

or this?

dim str
Response.Write "this "
Response.Write "that "
Response.Write "this and that"




绝对比这更好。


-

戴夫安德森


未经请求的商业电子邮件将以



Most definitely this is better than this.

--
Dave Anderson

Unsolicited commercial email will be read at a cost of

的价格阅读每个消息

500。使用

此电子邮件地址即表示同意这些条款。请不要直接联系

我或要求我直接与您联系以获取帮助。如果你的问题值得询问,那就值得发帖了。
500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it''s worth posting.


" Dave Anderson"在消息中写道

news:ec ************** @ TK2MSFTNGP14.phx.gbl ...

:Roland Hall写道:

:>这样更好吗?

:>

:> dim str

:> str = str& 这个

:> str = str& 那个

:> str = str& 这和那个

:> Response.Write str

:>

:>或者这个?

:>

:> dim str

:> Response.Writethis

:> Response.Writethat

:> Response.Writethis and that



:绝对比这还要好。


结果如何这个怎么样?


-

Roland Hall

/ *此信息的分发是希望它能够很有用,但是没有任何保修的b $ b;甚至没有适销性的暗示保证

或特定用途的适用性。 * /

Technet脚本中心 - http:// www .microsoft.com / technet / scriptcenter /

WSH 5.6文档 - http://msdn.microsoft.com/downloads/list/webdev.asp

MSDN Library - http://msdn.microsoft.com/library/default.asp
"Dave Anderson" wrote in message
news:ec**************@TK2MSFTNGP14.phx.gbl...
: Roland Hall wrote:
: > Is this better?
: >
: > dim str
: > str = str & "this "
: > str = str & "that "
: > str = str & "this and that"
: > Response.Write str
: >
: > or this?
: >
: > dim str
: > Response.Write "this "
: > Response.Write "that "
: > Response.Write "this and that"
:
: Most definitely this is better than this.

What this settles this but how about that?

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp


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

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