I know just changing the odometer on giant databases when they are reindexing 
is an enormous saving of time.   Of course shutting off talk and status would 
be even better. 


----- Original Message -----
From: Charlie Coleman <[email protected]>
To: ProFox Email List <[email protected]>
Cc: 
Sent: Monday, December 5, 2011 5:54 PM
Subject: Re: Vfp and counter

At 04:49 PM 12/5/2011 -0500, MB Software Solutions,     LLC wrote:
>On 12/5/2011 8:47 AM, Gérard Lochon wrote:
> >> That will show you a WAIT WINDOW every 100 rows processed.
...
> m.todo = " of "+TRANSFORM(RECCOUNT())+" ..."
> > m.odom =  100
> > GO TOP
> >
> > SCAN REST
> >      SCAN NEXT m.odom
...
> >      WAIT WINDOW NOWAIT TRANSFORM(RECNO())+m.todo
> > ENDSCAN
...
>Wonder how much more efficiency that really gets you?

Obviously it is saving the MOD() function execution that would have 
otherwise hit on every record. VFP is pretty darn fast for an interpreted 
language, but dropping 1 line of code could be significant in tight loops. 
We're probably talking maybe around .5 microseconds (based on machine speed 
of course). So that'd be about .5 seconds every 1,000,000 records.

But that's raw numbers. The thing is, if your code inside the loop takes 
about 2 microseconds to process, the routine would appear to run 25% 
faster. If the code took 5 microseconds to run, the routine would appear to 
only get a 10% speed boost.

I'm definitely tucking away this technique. I've got a couple cases where 
I'm messing with multi-millions of rows. I'll try it both ways and see how 
significant the difference is.

-Charlie



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to