Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 23rd, 2006, 10:57 AM
Friend of Wrox
Join Date: May 2005
Location: , , .
Posts: 149
Thanks: 0
Thanked 0 Times in 0 Posts
Default performance issue

Does the following code affect the performance?
This is a memberhsip script.
and for each member I check if he is online or offline?
since it has another recordset(rslog) that will be executed for each record inside the first recordset
if yes is there any other way?

rsFriend.Open "SELECT * friends"
 If NOT (rsFriend.BOF AND rsFriend.EOF) Then
    If CInt(intPage) > CInt(intPageCount) Then intPage = intPageCount
    If CInt(intPage) <= 0 Then intPage = 1
        If intRecordCount > 0 Then
            rsFriend.AbsolutePage = intPage
            intStart = rsFriend.AbsolutePosition
            If CInt(intPage) = CInt(intPageCount) Then
                intFinish = intRecordCount
                intFinish = intStart + (rsFriend.PageSize - 1)
            End if
        End If

numberOfColumns =5
Response.Write "<table><tr>"
If intRecordCount > 0 Then
For intRecord = 1 to rsFriend.PageSize

set rsLog=server.createobject("adodb.recordset")
strSql = "SELECT * FROM cmm_logTime WHERE offline=0 AND userid=" & rsFriend("userID")
    rslog.Open strSQL, conn,3, 3
if not rsLog.eof then
end if

       <TD class=picFrame style="MARGIN: 0px" vAlign=top align=middle><SPAN >
                             <DIV class=head> <A href="profile.asp?uid=<%=rsFriend("userID")%>" >
                <%if rsFriend("userPic") <> "" Then%><IMG alt=<%=rsFriend("firstname")%> src="user_images/<%=rsFriend("UserPic")%>" width=<%=intWidth%> height=<%=intHeight%> border=0>
                <%if rsFriend("gender")="male" then%>
                <IMG alt=<%=rsFriend("firstname")%> src="user_images/noimage_male.jpg" width=<%=intWidth%> height=<%=intHeight%> border=0>
                <IMG alt=<%=rsFriend("firstname")%> src="user_images/noimage_female.jpg" width=<%=intWidth%> height=<%=intHeight%> border=0>
                <%end if%>

                <%end if%>
<br><%if strOnline="y" then response.write "Online" else response.write "Offline"%>
 columnsDone = columnsDone + 1

    If columnsDone Mod numberOfColumns = 0 Then
        Response.Write "</tr><tr>"
    End If
    If rsFriend.EOF Then Exit for
'Response.Write "</tr></table>"
end if
end if


Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
performance issue with the xsl given here anboss XSLT 11 July 16th, 2008 03:05 AM
Performance Issue of Execution bjohnjebastin ASP.NET 1.0 and 1.1 Basics 1 November 14th, 2005 11:18 AM
issue of performance alyeng2000 SQL Server 2000 6 August 20th, 2004 01:17 PM
Performance issue deyakhatib SQL Server 2000 2 June 21st, 2004 10:47 PM

All times are GMT -4. The time now is 06:25 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.