473,569 Members | 2,872 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
Jul 19 '05 #1
8 2635
The exercise you went through will lead to more efficient insane and
pointless programming in the future.

"Tom Siltwater" <Si*******@no-email-please.com> wrote in message
news:uq******** ******@TK2MSFTN GP10.phx.gbl...

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

Jul 19 '05 #2
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" <Si*******@no-email-please.com> wrote in message
news:uq******** ******@TK2MSFTN GP10.phx.gbl...

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

Jul 19 '05 #3
Tom Siltwater wrote:
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


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(arResul ts) then
for i = 0 to ubound(arResult s,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.
Jul 19 '05 #4
Tom Siltwater wrote:
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?

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.
Jul 19 '05 #5

thanks :-)

"Jeff Clark" <JeffC@NO_SPAMr eturnventures.c om> wrote in message
news:eJ******** ******@TK2MSFTN GP09.phx.gbl...
The exercise you went through will lead to more efficient insane and
pointless programming in the future.

"Tom Siltwater" <Si*******@no-email-please.com> wrote in message
news:uq******** ******@TK2MSFTN GP10.phx.gbl...

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


Jul 19 '05 #6

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" <ms*****@ielear ning.com> wrote in message
news:O4******** ******@TK2MSFTN GP11.phx.gbl...
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" <Si*******@no-email-please.com> wrote in message
news:uq******** ******@TK2MSFTN GP10.phx.gbl...

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


Jul 19 '05 #7

"Bob Barrows" <re******@NOyah oo.SPAMcom> wrote in message
news:ey******** ******@tk2msftn gp13.phx.gbl...
Tom Siltwater wrote:
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
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(arResul ts) then
for i = 0 to ubound(arResult s,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.


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.





Jul 19 '05 #8
Tom Siltwater wrote:

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.


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"
Jul 19 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
6255
by: Guy | last post by:
JavaScript can get time, can it get milliseconds, or actually just tenths of seconds? Thanks for all Guy
31
3578
by: Bob | last post by:
I have recently joined a healthcare company where I am the solo programmer. I am going to be starting work on a project. The management has asked me to provide an estimate of hours I am going to spend on the project. How do I estimate the number of hours I am going to spend on programming in a project? Thanks for help
1
7407
by: serge | last post by:
Right now the database I am working with is storing time in an Integer data type and is storing the time value in seconds. The application does not allow entering seconds. It accepts minutes and hours. I have a report where it is doing: SELECT SUM(TIMEENTERED) and the SUM is *blowing* up as the SUM is reaching
1
2367
by: Brett | last post by:
Does anyone know how to calculate hours that go over 24? I am tracking how many hours & seconds our production keyers work everyday. When I run a query for a length of time that a given employee has worked >24 hours, my day field goes to 31 and hours go to whatever the real total hours are less 24. I understand that the day is 30 if hours are <...
3
5566
by: Nigel Heald | last post by:
Hi Folks, We have a form that records flight times in hours and minutes, for example a 1 hour 15 minute flight is recorded as 1:15 Does anyone know how to get Access 2003 to calculate a total figure for a number of flight times recorded in a datasheet form? and is there a way to display flight times greater than 24 hours i.e 26:20 for...
3
1846
by: jbosrock | last post by:
Hi to all, Please bear with me as I am newly experienced in basic Access 2003 only. I don't know Visual Basic or macros at all but am attempting to learn on my own. Explanation: Our fleet of trucks have been installed with a GPS tracking system that downloads into csv files all detailed information. The drivers also swipe a card for when...
4
3008
by: NormAmst | last post by:
I have a list of CPU processing times and job durations for an entire department at work. There are 3 classifications I am maintaining. CPU time during peak hours , CPU time during non peak hours and total CPU time. I developed an Excel spreadsheet totaling the times and manually format a spreadsheet to present total jobs run and total CPU time...
19
2638
by: xianwei | last post by:
#include <stdio.h> #include <stdlib.h> #include <time.h> int main ( int argc, char *argv ) { long i = 10000000L; clock_t start, end; double duration;
1
1726
by: silversubey | last post by:
I am using a query to total hours (Cltbudget.CBudhours) and dollars (CltBudget.CBudFee) Grouped by client names (Cltbudget.CBudCltName). here is the Query: SELECT CltBudget.CBudCltName AS Client , SUM(CltBudget.CBudfee) AS 'Total Dollars' , SUM(CltBudget.CBudhours) AS 'Total Hours' FROM VPM.dbo.CltBudget CltBudget, CltDue WHERE...
0
8138
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7983
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6290
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5228
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3662
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2118
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1229
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
950
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.