Link to home
Start Free TrialLog in
Avatar of lazydave_bbk
lazydave_bbk

asked on

Slowing of office automation on XP SP2

I have an established MS Office automation application (written in VB) which until now has run quite happily on all Windows O/S and all versions of office.  I recently ran it on a new PC which shipped with XP SP2  pre installed, and Word and Excel documents which used to take 3 seconds to create now take around 110 seconds to create.  I also now get clipboard access errors where none would appear before. I am currently running it against Office 2000.

As the application is Office version agnostic, it is late binding - I wondered if the calls to getobject and createobject may have been the problem, and produced an early binding version which suffered the same problems.  I have also been through all the XP services turing off as much as possible, switched off the DEP (well as far as you can), and no change.  

Has anyone encountered a similar problem, and if so is there a work around?

Thanks

Dave

Avatar of inthedark
inthedark
Flag of United Kingdom of Great Britain and Northern Ireland image

Just count yourself lucky that you have not moved onto Office XP yet!!!!  I suspect that somebody at Microsoft has gone completely mad.  They have just about got Windows 2000 working correctly, well almost except for the USB hard disk drivers, and they announce that they are withdrawing support for it next year.  But please don't slash your wrists just yet!

Here is what I found out about XP & Office.  If you are connected to an AD Domain you must have your XP DNS point to the AD DC.  So if you are using DHCP controlled by a device, like a router, make sure that device is issuing your AD DC IP as the DNS server.  Otherwise the XP system endlessly tries flinging packets around the network.

I also purchased the Liutilities (Digital River) software that looks at all running services and tells you which ones you can ditch. You would be surprised at what is running that can be removed.  Also you need to disable the firewall.  Just when you think that you have your firewall configured just how you want it you make a minor change to your network settings and bingo the firewall jumps back in and starts blocking all of the stuff you wanted to get through.  

I thing the route of the problem is the ***p way that MS has implemented windows sockets. Even on .NET you have to get down to quite a low level in order to create a non-blocking socket. What this means is that when you send out a packet, if you don’t a response, the thread will wait endlessly for a response that never comes back.  I suspect that XP has a few of these problems, but that is just a guess. (Sometimes with XP you can start a job with the task manager running and see the system idle time increasing with no other activity, so why isn’t your job running. And then, after a few minutes it starts?)

I can suggest a faster way of creating documents.  I save a template as an RTF file.  I load the RTF file into a string, then replace tokens embedded in the RTF file with the data I want in the document.  You can event use tokens so split repeatable chucks, when the document is complete you save the RTF file and ask Word to just load the RTF and save as a document. This seems to be real fast.

You have only got to go to Google and type in "XP running slow" to realise that Microsoft have reached the same state that IBM reached in the early eighties. Because of IBM’s complete deafness the world’s professionals vowed to get the first bus out of town and never go back.  Whilst I think that the achievements of Bill Gates and Microsoft are stunning, but it is now stinging, if not stinking.
Furthermore, sometimes XP & Windows 2000 can be severly slowed by services that are trying to be started.  Sometimes you can see messages in your event logs indicating the a servics could not be started.  From the timings of these events you cann see that sometimes they appear serveral minutes, if not hours, after the PC was rebooted.  During this period other apps my try to use service which are not started and so the problem endlessly continues.  Also make sure that your System & Application log files properties are set to overwrite events as needed.  If your log files are full the system can't operate correctly.

Avatar of lazydave_bbk
lazydave_bbk

ASKER

Hi

Thanks for your answers but that's not it.  Firewall etc is all disabled - also I can't use RTF as clients need to edit the documents (as templates that are then processed by my app).    Checked all the log file setting etc and it's the same.  It appears to be when I am making calls to the Word object that things slow right down.  I have a lot less calls to Excel so it is not as bad.  It may also be worth mentioning that another PC shipped with XP SP2 pre installed is the same, whereas one that had SP2 installed seperately is nowhere near as bad.

Thanks for your help

Dave
Do you have any red items in the event logs?
ASKER CERTIFIED SOLUTION
Avatar of modulo
modulo

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial