Access Code Slows way down Second time it is run
Hay there,
I have one form with a rather large amunt of code behind it collecting data from an electronic instrument (via serial commands to that instrument and via GPIB interface to some test equipment). Anyway...
The first time I run this test it runs fine. The second time a little slowerm the 3rd time much slower.
I closed the form between runs. No change.
If I exit Access 200 and re-load the database, that form is very fast again.
When the program is slowed down by multiple runs, every test form after that one is slow too. If I only run the test forms once, between instruments and then exit Access and re-load Access, there is no perceived slow downs and my routines all run fast.
Does Access 2000 have a memory leak. The form in question does save data in arrays and then when it's time the data from the arrays is saved in tables and the form closes.
When the slow down occurs, it makes the remaing three test forms take maybe 20 minutes to complere their tests whereas if they run at full-speed the first time through they take 5 minutes.
It like I used up the memory and instead of releasing it, I just keep taking up more.
The form code that I think is causing this error does have variables that
dimensioned to be used by all subs and functions within that module:
Option Compare Database
Dim Results(6, 42) As Single, CourseResults(6, 9) As Single
Dim GainCntlStartGain As Single
Dim NoiseStartGain(7) As Single, NoiseExtAtt(7) As Integer, NoiseGenV(7) As Single, NoiseMeasNoise(7) As Integer, NoisePass(7) As Boolean
Dim FilterPassed(7) As Boolean, GainControlMaxDeviation(7) As Single, GainControlCumulativeError(7, 4) As Single
'
'===================================================================================
Private Function CGP75(Freq As String) As Boolean
I am using a lot of variable arrays dimensioned as "single", but I really didn't think they were that much. when the form closed, they would all be wiped from memory anyway wouldn't they?
Hay there,
I have one form with a rather large amunt of code behind it collecting data from an electronic instrument (via serial commands to that instrument and via GPIB interface to some test equipment). Anyway...
The first time I run this test it runs fine. The second time a little slowerm the 3rd time much slower.
I closed the form between runs. No change.
If I exit Access 200 and re-load the database, that form is very fast again.
When the program is slowed down by multiple runs, every test form after that one is slow too. If I only run the test forms once, between instruments and then exit Access and re-load Access, there is no perceived slow downs and my routines all run fast.
Does Access 2000 have a memory leak. The form in question does save data in arrays and then when it's time the data from the arrays is saved in tables and the form closes.
When the slow down occurs, it makes the remaing three test forms take maybe 20 minutes to complere their tests whereas if they run at full-speed the first time through they take 5 minutes.
It like I used up the memory and instead of releasing it, I just keep taking up more.
The form code that I think is causing this error does have variables that
dimensioned to be used by all subs and functions within that module:
Option Compare Database
Dim Results(6, 42) As Single, CourseResults(6, 9) As Single
Dim GainCntlStartGain As Single
Dim NoiseStartGain(7) As Single, NoiseExtAtt(7) As Integer, NoiseGenV(7) As Single, NoiseMeasNoise(7) As Integer, NoisePass(7) As Boolean
Dim FilterPassed(7) As Boolean, GainControlMaxDeviation(7) As Single, GainControlCumulativeError(7, 4) As Single
'
'===================================================================================
Private Function CGP75(Freq As String) As Boolean
I am using a lot of variable arrays dimensioned as "single", but I really didn't think they were that much. when the form closed, they would all be wiped from memory anyway wouldn't they?
Last edited: