Solved

Slowing of office automation on XP SP2

Posted on 2004-10-22
141 Views
Last Modified: 2010-05-02
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

0
Question by:lazydave_bbk
    5 Comments
     
    LVL 17

    Expert Comment

    by:inthedark
    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.
    0
     
    LVL 17

    Expert Comment

    by:inthedark
    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.

    0
     

    Author Comment

    by:lazydave_bbk
    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
    0
     
    LVL 17

    Expert Comment

    by:inthedark
    Do you have any red items in the event logs?
    0
     

    Accepted Solution

    by:
    PAQed with no points refunded (of 250)

    modulo
    Community Support Moderator
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone. Privacy Policy Terms of Use

    Featured Post

    Course: Foundations of Front-End Development

    Jump-start a lucrative career in front-end web development, with zero previous coding experience required. This course covers the basic programming concepts and languages required for creating engaging websites from scratch.

    Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
    If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
    As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

    877 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now