Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Code takes too long to run
Message
 
 
To
10/08/2006 08:11:59
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01144231
Message ID:
01144577
Views:
7
>>>You did say at one point the whole thing took much longer and then suddenly it was much improved. I didn't notice if it was exclusive or not. Network traffic could be the culprit.
>>
>>Something happened with the PC where this process was running, I think. I have no explanation for 2h. of running this process.
>>
>>>Now, a difference of only 5 seconds seems to disprove the chunking theory. It would fit my thinking of there being only a difference in the number of executing lines of code. Small difference, but there. How many records are we talking about?
>>
>>Just 2046 records to process.
>
>Then there's no need to spend time optimizing this.

I think I see what's going on. I'm studying right now Batch Services code and see code similar to this in various places:
DO WHILE lcErr == "Error Found!"
			TRY
				lnAttempt = lnAttempt + 1
				IF lnAttempt != 100000
					OPEN DATABASE (thisform.cDatabase) SHARED
					lcErr = "Error Not Found!"				
				ELSE
					lcErr = "Error Not Found!"									
				ENDIF	
			CATCH TO oException1				
				lcErr = "Error Found!"				
			ENDTRY
		ENDDO
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform