Search code examples
comvb6activex

VB6 ActiveX DLL Running Slow On Terminal Server 2008


I have a VB6 ActiveX DLL that has run fine on all our machines for several years.

Recently our IT manager setup several locations so they remote into Terminal Server 2008 and run the program that accesses my DLL on the Terminal Server so that their databases are local to the corporate network. My DLL runs very slowly on the terminal server. What takes about 5 seconds on a local machine takes 30 seconds when run on terminal server.

One of my DLLs functions is to record messages in an XML log file. When the DLL logs it's first message it initializes the log by creating the logging DLL, then if the log object is not nothing it logs the message. When the log DLL writes a message it is time stamped and every call to write an item to the log seems to take around 5 seconds.

I wrote a small test application that does the same thing and creating the log dll object followed by writing an item to the log happens in about 1 second. I can't figure out why my DLL that runs fine anywhere else slows down on Terminal Server and I need ideas for what could cause this.


Solution

  • I don't know whether this is obvious, but I'd take out FileMon (or ProcessMon) and just look at how long logging takes. That would be my starting point.