R
RichardB
Hello looking for advice, suggestion, thoughts
I have a VB automation add-in for excel. This development / test platform
is vsto2008 on vista target excel 2003
Working on application tuning I have discovered something possibly unusal
and wonder if any one has insight or can explain - please.
Part of the automation writes to a sheet one cell at a time with
request.theSheetReference.Range(request.srcCellAddress).Offset(row,
col).Value = "TheText" I know there are other methods for sending to the
sheet, thats not what this question is about.
Output to the sheet is pretty fast, about 3000 cells in a minute. The above
is in a loop that runs on a dedicated thread and I am working on the tuning.
I have discovered how to speed it up and get 3000 cells in about 20
seconds, but why? how?
And even trickier; what code can I write to emulate this?
I discovered that while automation code is writing to the sheet it speeds up
dramatically when I grab either excel's or the workbook's title bar with the
mouse and simply move the window. If I release it it slows, grab it again
for a speed boost.
Does any one know why?
Hey this could be a nice program feature - like an easter egg or something.
Also I would have to do less error checking. If the user were busy speeding
up the application by wiggling the window around, I would not have to check
for user interference on the sheet?
Thanks for looking and considering this.
I have a VB automation add-in for excel. This development / test platform
is vsto2008 on vista target excel 2003
Working on application tuning I have discovered something possibly unusal
and wonder if any one has insight or can explain - please.
Part of the automation writes to a sheet one cell at a time with
request.theSheetReference.Range(request.srcCellAddress).Offset(row,
col).Value = "TheText" I know there are other methods for sending to the
sheet, thats not what this question is about.
Output to the sheet is pretty fast, about 3000 cells in a minute. The above
is in a loop that runs on a dedicated thread and I am working on the tuning.
I have discovered how to speed it up and get 3000 cells in about 20
seconds, but why? how?
And even trickier; what code can I write to emulate this?
I discovered that while automation code is writing to the sheet it speeds up
dramatically when I grab either excel's or the workbook's title bar with the
mouse and simply move the window. If I release it it slows, grab it again
for a speed boost.
Does any one know why?
Hey this could be a nice program feature - like an easter egg or something.
Also I would have to do less error checking. If the user were busy speeding
up the application by wiggling the window around, I would not have to check
for user interference on the sheet?
Thanks for looking and considering this.