locked
COm Interop + WCF + win 2003 + IIS 6.0 + .NET 3.5 SPI RRS feed

  • Question

  • Hi All,

    I am running into a strange performance issue.

    I have a WCF service that is using COM interop. The COM Dll does some calculation and returns a value back.
    This COM DLL talks to a SQL server Database. 

    When I run this WCF service on my machine (iis 5.1, win xp prof sp2), the calls to the COM Dll take about 1-2 seconds.

    I deploy this WCF service with the same COM dll talking to the same SQL server database on to a win 2003 machine with IIS 6.0 and .net 3.5 SP1 and the calls to the COM dll take about 4 times (more than 8 seconds). Sometimes this also spikes to 9 or 11 seconds. keep in mind, I am only measuring the time taken for the DLL call to execute. This does not include the client to server connectivity lag etc. Strictly apples to apples.

    My first thought was to see if there were any connetivity issues with connecting to the SQL server database from teh Win 2003 machine. 

    I wrote a simple windforms app that uses COM interop the same way that the WCF service uses and ran it on the win 2003 server. The App was lightning fast. This left me scratching my head.

    The only unknowns that could affect this are IIs6.0 vs. IIS5.1, win xp vs win 2003.

    Any body have any thoughts? Any known issues around this configuration?

    How would I go about debugging this issue?

    Thanks in advance.

    Neelima
    Tuesday, April 7, 2009 10:34 PM

Answers

  • Hi  Allen,

    This issue turned out to be a machine specific one.  And yes, I was using a StopWatch object to measure time elapsed.

    -Neelima

    Neelima
    • Marked as answer by Neelima_G Wednesday, April 15, 2009 7:01 PM
    Wednesday, April 15, 2009 7:00 PM

All replies

  • Hi,

    Could you check the CPU/memory usage of the Windows 2003 machine? Is it approximately same when testing the WinForm App and WCF? Do you get the same result in the second call to WCF?

    BTW, what's the way you use to measure the execution time? Stopwatch?
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Friday, April 10, 2009 2:25 AM
  • Hi  Allen,

    This issue turned out to be a machine specific one.  And yes, I was using a StopWatch object to measure time elapsed.

    -Neelima

    Neelima
    • Marked as answer by Neelima_G Wednesday, April 15, 2009 7:01 PM
    Wednesday, April 15, 2009 7:00 PM