freelanceprogrammers.org Forum Index » ASP

Re: Speed of output................ building literals.......


View user's profile Post To page top
peter_brunone Posted: Sat Jun 25, 2005 1:31 am


Joined: 11 Jan 2006

Posts: 38
Re: Speed of output................ building literals.......
   How about using a Repeater...?

From: "Mike Belcher" AspNetAnyQuestionIsOk@...

I wanted to ask some of the gurus here about speed and building output with
literals. I can and already have this it is a matter of speed. It seems a
lot slower than aspclassic was but is basically doing the same thing. So far
there are about 750 records that it outputs. This takes a minute with the
code below. I have a aspclassic site in comparison that outputs 3000 records
and does it in 1/10th the time. Is there a way to speed this up? Thanks.

----------------------------------------------------------------------------
----

While objDataReader.Read()

`DATABASE FIELDS
strTotalSubscribers = strTotalSubscribers + 1
strUsername = objDataReader("Username")
strMembershipType = objDataReader("MembershipType")
strSitenameDB = objDataReader("Sitename")
strDateJoined = objDataReader("DateJoined")
strP_Updated = objDataReader("P_Updated")
strLastPaymentAmount = objDataReader("LastPaymentAmount")
strLastPaymentDate = objDataReader("LastPaymentDate")
strNextPaymentDueDate = objDataReader("NextPaymentDueDate")

`MembershipType Detection
If strMembershipType = "Premium Member" Then
strMembershipType = "" & strMembershipType & ""

ElseIf strMembershipType = "Standard Member" Then

Else `They aren`t logged in or aren`t a member.

End If

`Is Payment OverDue Detection
If strNextPaymentDueDate < DateTime.Now().ToShortDateString()
Then
strNextPaymentDueDate = "" & strNextPaymentDueDate & ""

Else `They aren`t logged in or aren`t a member.

End If

LiteralOutput.Text = LiteralOutput.Text & ""
LiteralOutput.Text = LiteralOutput.Text & "nowrap>"

LiteralOutput.Text = LiteralOutput.Text & "size=`1`>"
LiteralOutput.Text = LiteralOutput.Text &
"href=`AdministratorUpdateSubscriber.aspx?username=" & strUsername &
"`>Edit color=`#000080`>| "
LiteralOutput.Text = LiteralOutput.Text &
"size=`1`>href=`AdministratorDeleteSubscriber.aspx?username=" & strUsername &
"`>Delete "
LiteralOutput.Text = LiteralOutput.Text & ""
LiteralOutput.Text = LiteralOutput.Text & "size=`1`>"` target=_blank>View "

LiteralOutput.Text = LiteralOutput.Text & " "
LiteralOutput.Text = LiteralOutput.Text & "nowrap>strUsername & "`>" &
strUsername & " "
LiteralOutput.Text = LiteralOutput.Text & "align=`center` nowrap>" &
strSitenameDB &
" "
LiteralOutput.Text = LiteralOutput.Text & "align=`center` nowrap>" &
strMembershipType &
" "
LiteralOutput.Text = LiteralOutput.Text & "align=`center` nowrap>" &
strLastPaymentAmount
& " "
LiteralOutput.Text = LiteralOutput.Text & "align=`center` nowrap>" &
strLastPaymentDate &
" "
LiteralOutput.Text = LiteralOutput.Text & "align=`center` nowrap>" &
strNextPaymentDueDate & " "

LiteralOutput.Text = LiteralOutput.Text & "align=`center` nowrap>" &
strDateJoined &
" "
LiteralOutput.Text = LiteralOutput.Text & "align=`center` nowrap>" &
strP_Updated &
" "

End While




[Non-text portions of this message have been removed]
Reply with quote
Send private message
View user's profile Post To page top
AspNetAnyQuestionIsOk@... Posted: Sat Jun 25, 2005 1:46 am


Joined: 25 Jun 2005

Posts: 5
Re: Speed of output................ building literals.......
I used a repeater in some instances but I don`t see how to customize and
programmatically do the checks on membership type etc before it outputs. The
look of the output is dependant on different conditions. With a repeater it
reads it then just binds to the repeater and I can`t do all that
programmatic stuff......... unless there is a way........ to do that.

-----Original Message-----
From: AspNetAnyQuestionIsOk@yahoogroups.com
[mailto:AspNetAnyQuestionIsOk@yahoogroups.com] On Behalf Of Peter Brunone
Sent: Friday, June 24, 2005 4:31 PM
To: AspNetAnyQuestionIsOk@yahoogroups.com
Subject: re: [AspNetAnyQuestionIsOk] Speed of output................
building literals..........



   How about using a Repeater...?



From: "Mike Belcher" AspNetAnyQuestionIsOk@...



I wanted to ask some of the gurus here about speed and building output with

literals. I can and already have this it is a matter of speed. It seems a

lot slower than aspclassic was but is basically doing the same thing. So far

there are about 750 records that it outputs. This takes a minute with the

code below. I have a aspclassic site in comparison that outputs 3000 records

and does it in 1/10th the time. Is there a way to speed this up? Thanks.



----------------------------------------------------------------------------

----



While objDataReader.Read()



`DATABASE FIELDS

strTotalSubscribers = strTotalSubscribers + 1

strUsername = objDataReader("Username")

strMembershipType = objDataReader("MembershipType")

strSitenameDB = objDataReader("Sitename")

strDateJoined = objDataReader("DateJoined")

strP_Updated = objDataReader("P_Updated")

strLastPaymentAmount = objDataReader("LastPaymentAmount")

strLastPaymentDate = objDataReader("LastPaymentDate")

strNextPaymentDueDate = objDataReader("NextPaymentDueDate")



`MembershipType Detection

If strMembershipType = "Premium Member" Then

strMembershipType = "" & strMembershipType & ""



ElseIf strMembershipType = "Standard Member" Then



Else `They aren`t logged in or aren`t a member.



End If



`Is Payment OverDue Detection

If strNextPaymentDueDate < DateTime.Now().ToShortDateString()

Then

strNextPaymentDueDate = "" & strNextPaymentDueDate & ""



Else `They aren`t logged in or aren`t a member.



End If



LiteralOutput.Text = LiteralOutput.Text & ""

LiteralOutput.Text = LiteralOutput.Text & "nowrap>"



LiteralOutput.Text = LiteralOutput.Text & "size=`1`>"

LiteralOutput.Text = LiteralOutput.Text &
"href=`AdministratorUpdateSubscriber.aspx?username=" & strUsername &

"`>Edit color=`#000080`>| "

LiteralOutput.Text = LiteralOutput.Text &
"size=`1`>href=`AdministratorDeleteSubscriber.aspx?username=" & strUsername
&

"`>Delete "

LiteralOutput.Text = LiteralOutput.Text & ""

LiteralOutput.Text = LiteralOutput.Text & "size=`1`>"` target=_blank>View "



LiteralOutput.Text = LiteralOutput.Text & " "

LiteralOutput.Text = LiteralOutput.Text & "nowrap>strUsername & "`>" &
strUsername & " "

LiteralOutput.Text = LiteralOutput.Text & "align=`center` nowrap>" &
strSitenameDB &

" "

LiteralOutput.Text = LiteralOutput.Text & "align=`center` nowrap>" &
strMembershipType &

" "

LiteralOutput.Text = LiteralOutput.Text & "align=`center` nowrap>" &
strLastPaymentAmount

& " "

LiteralOutput.Text = LiteralOutput.Text & "align=`center` nowrap>" &
strLastPaymentDate &

" "

LiteralOutput.Text = LiteralOutput.Text & "align=`center` nowrap>" &

strNextPaymentDueDate & " "



LiteralOutput.Text = LiteralOutput.Text & "align=`center` nowrap>" &
strDateJoined &

" "

LiteralOutput.Text = LiteralOutput.Text & "align=`center` nowrap>" &
strP_Updated &

" "



End While






[Non-text portions of this message have been removed]




Yahoo! Groups Links
Reply with quote
Send private message
View user's profile Post To page top
peter_brunone Posted: Sat Jun 25, 2005 1:54 am


Joined: 11 Jan 2006

Posts: 38
Re: Speed of output................ building literals.......
   In your repeater, instead of just putting a reference to a field in there,
put in a reference to a function that manipulates the field.  That is, instead
of this:

<%# DataBinder.Eval(Container.DataItem, "strMembershipType")%>

you would use this:

<%# CheckMember(DataBinder.Eval(Container.DataItem, "strMembershipType"))%>

..where CheckMember analyzes the string, modifies it if necessary, and then
spits out the result which is shown in your repeater.

Cheers,

Peter

From: "Mike Belcher" AspNetAnyQuestionIsOk@...

I used a repeater in some instances but I don`t see how to customize and
programmatically do the checks on membership type etc before it outputs. The
look of the output is dependant on different conditions. With a repeater it
reads it then just binds to the repeater and I can`t do all that
programmatic stuff......... unless there is a way........ to do that.

-----Original Message-----
From: AspNetAnyQuestionIsOk@yahoogroups.com
[mailto:AspNetAnyQuestionIsOk@yahoogroups.com] On Behalf Of Peter Brunone
Sent: Friday, June 24, 2005 4:31 PM
To: AspNetAnyQuestionIsOk@yahoogroups.com
Subject: re: [AspNetAnyQuestionIsOk] Speed of output................
building literals..........

   How about using a Repeater...?

From: "Mike Belcher" AspNetAnyQuestionIsOk@...

I wanted to ask some of the gurus here about speed and building output with

literals. I can and already have this it is a matter of speed. It seems a

lot slower than aspclassic was but is basically doing the same thing. So far

there are about 750 records that it outputs. This takes a minute with the

code below. I have a aspclassic site in comparison that outputs 3000 records

and does it in 1/10th the time. Is there a way to speed this up? Thanks.

----------------------------------------------------------------------------

----

While objDataReader.Read()

`DATABASE FIELDS

strTotalSubscribers = strTotalSubscribers + 1

strUsername = objDataReader("Username")

strMembershipType = objDataReader("MembershipType")

strSitenameDB = objDataReader("Sitename")

strDateJoined = objDataReader("DateJoined")

strP_Updated = objDataReader("P_Updated")

strLastPaymentAmount = objDataReader("LastPaymentAmount")

strLastPaymentDate = objDataReader("LastPaymentDate")

strNextPaymentDueDate = objDataReader("NextPaymentDueDate")

`MembershipType Detection

If strMembershipType = "Premium Member" Then

strMembershipType = "" & strMembershipType & ""

ElseIf strMembershipType = "Standard Member" Then

Else `They aren`t logged in or aren`t a member.

End If

`Is Payment OverDue Detection

If strNextPaymentDueDate < DateTime.Now().ToShortDateString()

Then

strNextPaymentDueDate = "" & strNextPaymentDueDate & ""

Else `They aren`t logged in or aren`t a member.

End If

LiteralOutput.Text = LiteralOutput.Text & ""

LiteralOutput.Text = LiteralOutput.Text & "nowrap>"

LiteralOutput.Text = LiteralOutput.Text & "size=`1`>"

LiteralOutput.Text = LiteralOutput.Text &
"href=`AdministratorUpdateSubscriber.aspx?username=" & strUsername &

"`>Edit color=`#000080`>| "

LiteralOutput.Text = LiteralOutput.Text &
"size=`1`>href=`AdministratorDeleteSubscriber.aspx?username=" & strUsername
&

"`>Delete "

LiteralOutput.Text = LiteralOutput.Text & ""

LiteralOutput.Text = LiteralOutput.Text & "size=`1`>"` target=_blank>View "

LiteralOutput.Text = LiteralOutput.Text & " "

LiteralOutput.Text = LiteralOutput.Text & "nowrap>strUsername & "`>" &
strUsername & " "

LiteralOutput.Text = LiteralOutput.Text & "align=`center` nowrap>" &
strSitenameDB &

" "

LiteralOutput.Text = LiteralOutput.Text & "align=`center` nowrap>" &
strMembershipType &

" "

LiteralOutput.Text = LiteralOutput.Text & "align=`center` nowrap>" &
strLastPaymentAmount

& " "

LiteralOutput.Text = LiteralOutput.Text & "align=`center` nowrap>" &
strLastPaymentDate &

" "

LiteralOutput.Text = LiteralOutput.Text & "align=`center` nowrap>" &

strNextPaymentDueDate & " "

LiteralOutput.Text = LiteralOutput.Text & "align=`center` nowrap>" &
strDateJoined &

" "

LiteralOutput.Text = LiteralOutput.Text & "align=`center` nowrap>" &
strP_Updated &

" "

End While


[Non-text portions of this message have been removed]
Reply with quote
Send private message
Post new topic Reply to topic
Display posts from previous:   
 

All times are GMT
Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Freelace Website Designer - Customer web design and software building.
China Wholesale - Electronics Products
Character Studio - Tutorials and Help