I'm doing some performance testing of a C# implementation of a collection. The collection needs to be created from an existing VB6 application, so it requires COM interop. I created a couple of variations of the collection, each using the same interface, in unmanaged C++ and in C#. Since each server implementation uses the same interfaces, I have only to change the ProgID in the VB6 client to switch between the collection implementations; I don't recompile the client. Just for yuks, I also created a C# client so I could compare its performance with the VB6 client.
I've seen some big differences in speed between the managed and unmanaged implementations, and I think I can see where they come from - interop can be slow. But what I don't understand is the memory usage, which can be summarized like: Client Server Private bytes (from perfmon, 1M items in the collection) VB6 unmanaged C++ 77 MB VB6 C# 257 MB <--!!!! C# unmanaged C++ 87 MB C# C# 74 MB Is there some fundamental reason for such a big change in memory usage when the C# server is used with the VB6 client? I haven't done a lot with .Net or performance testing so any pointers would be appreciated. Thanks! You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.