Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

processing time degradation when using Err.Clear()

Status
Not open for further replies.

threeo

Programmer
Mar 31, 2005
49
US
why does Err.Clear() add so much processing time?

i've tested this in a loop. if i include the line
Err.Clear()
within my loop to clear out any errors from the previous record's processing....the processing time goes WAY WAY up.
if i comment out the Err.Clear() my times are very fast

processing times WITH Err.Clear(): without Err.Clear():
100 records: 1 second 1 second
200 records: 8 seconds 2 seconds
300 records: 41 seconds 4 seconds
400 records: 114 seconds 8 seconds
1000 records: forgetahboutit 24 seconds
 
I guess that's simply how long it takes to run that method. You could always check if an error exists before calling Err.Clear (i.e. only call it if it is necessary) as that may save you some time.

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

Need help finding an answer?

Try the search facilty ( or read FAQ222-2244 on how to get better results.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top