tags:

views:

103

answers:

1

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.

+1  A: 

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.

AngryHacker
I already had the times logged in the file for each write, but your suggestion did lead to the answer. I though using process monitor might lead me to something else in the process and when I did that I discovered many more writes to the file than I expected. The program keeps log items for a specified number of days before removing them and with multiple users using the log on the Terminal Server it had grown large enough to explain the delay. I wish I had thought of that first.
Beaner