I have noticed a significant slowdown with 2010 compared with 2003. With a simple loop to change control properties in a form with 2010 takes about 4 times longer to complete than 2003 using the same computer. This is an example:
For y = 0 To 639 Step myNumColumns
For x = y To (y + myNumColumns - 1)
Me("Label" & x).Caption = Me("Label" & x).Name & "BILL"
Me("Label" & x).Left = ((x - y) * MyColumnWidth) + MyTimeColumnWidth
Me("Label" & x).Width = MyColumnWidth
Me("Label" & x).Height = MyRowHeight
Me("Label" & x).Top = r * MyRowHeight
Me("Label" & x).Visible = True
Me("Label" & x).BorderColor = MyColorGrid
Next
r = r + 1
Next y
I have tried turning echo off before running the loop and back on after but it did not help. I tried using a construct and that helped some, but not much. I even tried running it on a new Windows 7 DuoCore system but 2010 ran much slower than 2003. It seems that 2007 is 2x slower than 2003 and 2010 is 2x slower than 2007. I was wondering if anyone had any insight into what is going on or any suggestion on how to speed things up using better code.
I've included a sample for evaluation.
Thanks.
For y = 0 To 639 Step myNumColumns
For x = y To (y + myNumColumns - 1)
Me("Label" & x).Caption = Me("Label" & x).Name & "BILL"
Me("Label" & x).Left = ((x - y) * MyColumnWidth) + MyTimeColumnWidth
Me("Label" & x).Width = MyColumnWidth
Me("Label" & x).Height = MyRowHeight
Me("Label" & x).Top = r * MyRowHeight
Me("Label" & x).Visible = True
Me("Label" & x).BorderColor = MyColorGrid
Next
r = r + 1
Next y
I have tried turning echo off before running the loop and back on after but it did not help. I tried using a construct and that helped some, but not much. I even tried running it on a new Windows 7 DuoCore system but 2010 ran much slower than 2003. It seems that 2007 is 2x slower than 2003 and 2010 is 2x slower than 2007. I was wondering if anyone had any insight into what is going on or any suggestion on how to speed things up using better code.
I've included a sample for evaluation.
Thanks.