I've developed an Excel 2003 addin in C#, using VSTO and VS 2008. The addin works just fine on my machine (HP NC6320 laptop, 3gb RAM T5600 1.8ghz Core2 cpu), however when it is tested on another users machine (HP nc6710b laptop 2gb RAM, T7200 2ghz Core2 cpu), it is substantially slower. I've also tried it on another laptop the same type as mine, and it is also fast
I've been through the obvious things, like applications running, Antivirus stuff, etc. The machines are both fully patched, and up to date.
Basically, what the addin does is: 1. Read data from a SQL Server 2005 database 2. Do some manipulation on it 3. Display it on a worksheet, and format it appropriately
The slow bit is the displaying on the worksheet.
I'm stumped as to why it would be slower on a newer machine.. Just to really confuse myself, I tried it on a VM (VMware Workstation v6.5) with 256mb RAM, and 1 cpu, running xp and only Office 2003 installed on it, and it was substantially quicker than the new laptop.
So in summary, an Excel Addin performs quickly on a low spec VM, and on an older laptop, but on a newer spec laptop it is slower.
Any suggestions would be gratefully recieved ?
Many thanks
Nick
edit:
Ok, I've checked the printer drivers, they are the same... I've checked the fragmentation levels, and if anything, the faster machine is less fragmented than the slower one..
Am looking at the events settings..
You can also add
Application.EnableEvents = False
to your code before starting dumping your data to spreadsheet to stop any other Excel Add-Ins or any VBA code waiting for applciation level change/update events. Don't forget to re-enable events after your are done!!
Check that the slow machine does not have any XLA or COM addins installed (ie Google Office Addin) or any other potentially event-trapping code in Personal.XLS etc
Presumably you are already doing all the standard speedup things such as: - turning off automatic calculation and screenupdating before writing to XL - writing and formatting cells in a single large block rather than cell-by-cell - ...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With