Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 19th, 2005, 09:20 AM
Tom Siltwater
Guest
 
Posts: n/a
Default I just spent several hours shaving a total of 250 milliseconds off my application


building variable width/DB tables etc using getrows instead of movenext.
Performance is a major concern as this app requires SSL.

My question is, when does it become more about the challenge of building
faster apps vs. getting the job done??? If my calculations are correct, I
just added an extra 10,000+ possible hits within a 12 hour day or so.. an
extra 10,000 hits???!!! What percentage of applications do you think will
ever see this kind of traffic?

Is this insane? If this app ever gets maxed out, will my end users ever
realistically notice a difference?


TIA


  #2  
Old July 19th, 2005, 09:20 AM
Jeff Clark
Guest
 
Posts: n/a
Default Re: I just spent several hours shaving a total of 250 milliseconds off my application

The exercise you went through will lead to more efficient insane and
pointless programming in the future.



"Tom Siltwater" <Siltwater@no-email-please.com> wrote in message
news:uq0TAVznDHA.2848@TK2MSFTNGP10.phx.gbl...[color=blue]
>
> building variable width/DB tables etc using getrows instead of movenext.
> Performance is a major concern as this app requires SSL.
>
> My question is, when does it become more about the challenge of building
> faster apps vs. getting the job done??? If my calculations are correct, I
> just added an extra 10,000+ possible hits within a 12 hour day or so.. an
> extra 10,000 hits???!!! What percentage of applications do you think will
> ever see this kind of traffic?
>
> Is this insane? If this app ever gets maxed out, will my end users ever
> realistically notice a difference?
>
>
> TIA
>
>[/color]


  #3  
Old July 19th, 2005, 09:22 AM
Mark Schupp
Guest
 
Posts: n/a
Default Re: I just spent several hours shaving a total of 250 milliseconds off my application

It was probably worthwhile to learn the technique so that you can apply it
in similar situations in the future.

In general you should apply the same rules of performance optimization that
are used in non-web apps. Profile the application to see where the users
spend most of their time and concentrate your efforts on that portion of the
application. If you shave 250ms second off of a page the gets hit once an
hour you've wasted your time. If it gets hit 10 times a second then you've
made a significant improvement in performance.

When developing new pages or making major changes to old pages use the
optimization techniques that you have learned.

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com


"Tom Siltwater" <Siltwater@no-email-please.com> wrote in message
news:uq0TAVznDHA.2848@TK2MSFTNGP10.phx.gbl...[color=blue]
>
> building variable width/DB tables etc using getrows instead of movenext.
> Performance is a major concern as this app requires SSL.
>
> My question is, when does it become more about the challenge of building
> faster apps vs. getting the job done??? If my calculations are correct, I
> just added an extra 10,000+ possible hits within a 12 hour day or so.. an
> extra 10,000 hits???!!! What percentage of applications do you think will
> ever see this kind of traffic?
>
> Is this insane? If this app ever gets maxed out, will my end users ever
> realistically notice a difference?
>
>
> TIA
>
>[/color]


  #4  
Old July 19th, 2005, 09:22 AM
Bob Barrows
Guest
 
Posts: n/a
Default Re: I just spent several hours shaving a total of 250 milliseconds off my application

Tom Siltwater wrote:[color=blue]
> building variable width/DB tables etc using getrows instead of
> movenext. Performance is a major concern as this app requires SSL.
>
> My question is, when does it become more about the challenge of
> building faster apps vs. getting the job done??? If my calculations
> are correct, I just added an extra 10,000+ possible hits within a 12
> hour day or so.. an extra 10,000 hits???!!! What percentage of
> applications do you think will ever see this kind of traffic?
>
> Is this insane? If this app ever gets maxed out, will my end users
> ever realistically notice a difference?
>
>
> TIA[/color]

I don't get it. Why do you say it took so much longer using a getrows array
vs a recordset loop?

Recordset loop:

if not rs.eof then
Do until rs.eof
rs.movenext
loop
else
'handle no-records event
end if
rs.close:set rs=nothing
cn.close:set cn=nothing

GetRows array loop:

if not rs.eof then arResults-rs.getrows
rs.close:set rs=nothing
cn.close:set cn=nothing
if isarray(arResults) then
for i = 0 to ubound(arResults,2)
next
else
'handle no-records event
end if


9 lines vs 9 lines. Where is the increase in development time?

Bob Barrows

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


  #5  
Old July 19th, 2005, 09:22 AM
Bob Barrows
Guest
 
Posts: n/a
Default Re: I just spent several hours shaving a total of 250 milliseconds off my application

Tom Siltwater wrote:[color=blue]
> building variable width/DB tables etc using getrows instead of
> movenext. Performance is a major concern as this app requires SSL.
>
> My question is, when does it become more about the challenge of
> building faster apps vs. getting the job done??? If my calculations
> are correct, I just added an extra 10,000+ possible hits within a 12
> hour day or so.. an extra 10,000 hits???!!! What percentage of
> applications do you think will ever see this kind of traffic?
>
> Is this insane? If this app ever gets maxed out, will my end users
> ever realistically notice a difference?
>[/color]
Just wanted to add: while you may have improved performance by "only" 250ms
for this page, you are ignoring the fact that you have improved the overall
utilization of connections on your server by releasing connections before
processing the data. So there will be improved performance and less
resources used on your server overall as a result of this development
method.

Bob Barrows

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


  #6  
Old July 19th, 2005, 09:22 AM
Tom Siltwater
Guest
 
Posts: n/a
Default Re: I just spent several hours shaving a total of 250 milliseconds off my application


thanks :-)

"Jeff Clark" <JeffC@NO_SPAMreturnventures.com> wrote in message
news:eJzDZrznDHA.1072@TK2MSFTNGP09.phx.gbl...[color=blue]
> The exercise you went through will lead to more efficient insane and
> pointless programming in the future.
>
>
>
> "Tom Siltwater" <Siltwater@no-email-please.com> wrote in message
> news:uq0TAVznDHA.2848@TK2MSFTNGP10.phx.gbl...[color=green]
> >
> > building variable width/DB tables etc using getrows instead of movenext.
> > Performance is a major concern as this app requires SSL.
> >
> > My question is, when does it become more about the challenge of building
> > faster apps vs. getting the job done??? If my calculations are correct,[/color][/color]
I[color=blue][color=green]
> > just added an extra 10,000+ possible hits within a 12 hour day or so..[/color][/color]
an[color=blue][color=green]
> > extra 10,000 hits???!!! What percentage of applications do you think[/color][/color]
will[color=blue][color=green]
> > ever see this kind of traffic?
> >
> > Is this insane? If this app ever gets maxed out, will my end users ever
> > realistically notice a difference?
> >
> >
> > TIA
> >
> >[/color]
>
>[/color]


  #7  
Old July 19th, 2005, 09:22 AM
Tom Siltwater
Guest
 
Posts: n/a
Default Re: I just spent several hours shaving a total of 250 milliseconds off my application


I'm just now getting to the "tweaking" stage of scripting. Before it was all
about just getting it to work. I made an error with my performance
estimate.. it's actually running 3x faster than rs.movenext..! That put a
big smile on my face last night after all that struggling.

Thanks for the advice


"Mark Schupp" <mschupp@ielearning.com> wrote in message
news:O4c1$78nDHA.3612@TK2MSFTNGP11.phx.gbl...[color=blue]
> It was probably worthwhile to learn the technique so that you can apply it
> in similar situations in the future.
>
> In general you should apply the same rules of performance optimization[/color]
that[color=blue]
> are used in non-web apps. Profile the application to see where the users
> spend most of their time and concentrate your efforts on that portion of[/color]
the[color=blue]
> application. If you shave 250ms second off of a page the gets hit once an
> hour you've wasted your time. If it gets hit 10 times a second then you've
> made a significant improvement in performance.
>
> When developing new pages or making major changes to old pages use the
> optimization techniques that you have learned.
>
> --
> Mark Schupp
> Head of Development
> Integrity eLearning
> www.ielearning.com
>
>
> "Tom Siltwater" <Siltwater@no-email-please.com> wrote in message
> news:uq0TAVznDHA.2848@TK2MSFTNGP10.phx.gbl...[color=green]
> >
> > building variable width/DB tables etc using getrows instead of movenext.
> > Performance is a major concern as this app requires SSL.
> >
> > My question is, when does it become more about the challenge of building
> > faster apps vs. getting the job done??? If my calculations are correct,[/color][/color]
I[color=blue][color=green]
> > just added an extra 10,000+ possible hits within a 12 hour day or so..[/color][/color]
an[color=blue][color=green]
> > extra 10,000 hits???!!! What percentage of applications do you think[/color][/color]
will[color=blue][color=green]
> > ever see this kind of traffic?
> >
> > Is this insane? If this app ever gets maxed out, will my end users ever
> > realistically notice a difference?
> >
> >
> > TIA
> >
> >[/color]
>
>[/color]


  #8  
Old July 19th, 2005, 09:22 AM
Tom Siltwater
Guest
 
Posts: n/a
Default Re: I just spent several hours shaving a total of 250 milliseconds off my application


"Bob Barrows" <reb01501@NOyahoo.SPAMcom> wrote in message
news:eyQOtu9nDHA.1764@tk2msftngp13.phx.gbl...[color=blue]
> Tom Siltwater wrote:[color=green]
> > building variable width/DB tables etc using getrows instead of
> > movenext. Performance is a major concern as this app requires SSL.
> >
> > My question is, when does it become more about the challenge of
> > building faster apps vs. getting the job done??? If my calculations
> > are correct, I just added an extra 10,000+ possible hits within a 12
> > hour day or so.. an extra 10,000 hits???!!! What percentage of
> > applications do you think will ever see this kind of traffic?
> >
> > Is this insane? If this app ever gets maxed out, will my end users
> > ever realistically notice a difference?
> >
> >
> > TIA[/color]
>
> I don't get it. Why do you say it took so much longer using a getrows[/color]
array[color=blue]
> vs a recordset loop?
>
> Recordset loop:
>
> if not rs.eof then
> Do until rs.eof
> rs.movenext
> loop
> else
> 'handle no-records event
> end if
> rs.close:set rs=nothing
> cn.close:set cn=nothing
>
> GetRows array loop:
>
> if not rs.eof then arResults-rs.getrows
> rs.close:set rs=nothing
> cn.close:set cn=nothing
> if isarray(arResults) then
> for i = 0 to ubound(arResults,2)
> next
> else
> 'handle no-records event
> end if
>
>
> 9 lines vs 9 lines. Where is the increase in development time?
>
> Bob Barrows
>
> --
> Microsoft MVP -- ASP/ASP.NET
> Please reply to the newsgroup. The email account listed in my From
> header is my spam trap, so I don't check it very often. You will get a
> quicker response by posting to the newsgroup.
>
>[/color]



It's actually just over a hundred lines of code. I'm using a single function
to dynamically build tables which takes 10 different arguments for column
widths, height, table headers, anchor tags etc etc.. just about every page
within the site will use this function now.













  #9  
Old July 19th, 2005, 09:22 AM
Bob Barrows
Guest
 
Posts: n/a
Default Re: I just spent several hours shaving a total of 250 milliseconds off my application

Tom Siltwater wrote:
[color=blue]
>
> It's actually just over a hundred lines of code. I'm using a single
> function to dynamically build tables which takes 10 different
> arguments for column widths, height, table headers, anchor tags etc
> etc.. just about every page within the site will use this function
> now.[/color]

I still don't see where you did anything "extra" by using getrows vs a
recordset loop. You would have had to write this function in either case
wouldn't you? I can see using maybe 5 or 6 extra lines to create an array to
contain the recordset's metadata if you need to use that, but ... 100 extra
lines because you're using getrows vs a recordset loop? I don't understand.

Bob Barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


 

Bookmarks

Thread Tools

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles