Re: CCW overheads

From: Mattias Sjögren (mattias.dont.want.spam_at_mvps.org)
Date: 02/19/04


Date: Thu, 19 Feb 2004 22:18:51 +0100

Jack,

It's impossible to say with only that information if COM interop
overhead will be an issue or not for you. It all depends on how many
calls you make, how often and how much data that has to be marshaled
each time.

The only way to tell is to measure it.

There are of course ways you can improve performance. The main
recommendation is to use "chunky" (few calls, as much data as possible
each time) rather than "chatty" interfaces (many calls, few or no
arguments - property accessors for example).

Mattias

-- 
Mattias Sjögren [MVP]  mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.


Relevant Pages

  • Re: Last Stumbling Block on Subclassing OpenFileDialog - AddressOf problem
    ... For interop use it's usually best to call Marshal.SizeOfto retrieve ... Mattias Sjögren [MVP] mattias @ mvps.org ... Please reply only to the newsgroup. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Exporting functions
    ... This question relates to making plugins for an ... COM interop. ... Mattias Sjögren [MVP] mattias @ mvps.org ... Please reply only to the newsgroup. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Garbage collectable pinned arrays!
    ... The OP is measuring the overhead of a GCHandle.Alloc, ... exactly what is done by GCHandle.Alloc with GCHandleType.Pinned, that's why he is measuring this methods overhead. ... But interop doesn't pin implicitely, it pins the arguments when needed. ... "Pointer Table" together with some ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Interop Marshalling Overhead - Newbie qn
    ... Interop Overhead ... In my application I'm quite comfortable with the interop ... Marshalling Overhead ... int GetDataFromXYZ; ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Interop Marshalling Overhead - Newbie qn
    ... SuppressUnmanagedCodeSecurityAttribute to my interop calls I could reduce the ... interop access overhead by a factor of 4-5! ... >> expensive marshalling penalties. ...
    (microsoft.public.dotnet.languages.csharp)

Loading