Re: Interop Marshalling Overhead - Newbie qn
- From: "Willy Denoyette [MVP]" <willy.denoyette@xxxxxxxxxx>
- Date: Tue, 30 Aug 2005 13:53:25 +0200
"steve" <steve@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:D35406B8-5A62-4A80-A8B7-D1D3B9D0D0BE@xxxxxxxxxxxxxxxx
> Almost missed something in your original reply
>
> If I'm hearing you correctly hear. If I apply a
> SuppressUnmanagedCodeSecurityAttribute to my interop calls I could reduce
> the
> interop access overhead by a factor of 4-5!
>
> Now that's worth talking about! Will look into that one, since it could
> make writing C# classes that directly call some Win32 APIs plausible.
>
> Cheers,
>
> Steve
>
Yes, that's right, SuppressUnmanagedCodeSecurityAttribute removes the
security check when calling into unmanaged code, but before you apply this
in general you should make sure you fully understand the implications at the
security level.
Note also that the few hundred cycles you save may be important for a few
simple API's you call, while for most others this overhead is simply
negligible compared to the marshaling overhead for instance. IMO you
shouldn't care about this, unless the call overhead is really a bottleneck
or in high frequency call scenarios, in which case you might have chosen the
wrong language/environment anyway.
Willy.
.
- References:
- Interop Marshalling Overhead - Newbie qn
- From: steve
- Re: Interop Marshalling Overhead - Newbie qn
- From: Willy Denoyette [MVP]
- Re: Interop Marshalling Overhead - Newbie qn
- From: steve
- Interop Marshalling Overhead - Newbie qn
- Prev by Date: URL inside a mail produced with asp.net
- Next by Date: Re: URL inside a mail produced with asp.net
- Previous by thread: Re: Interop Marshalling Overhead - Newbie qn
- Next by thread: Gragphics.DrawImage on a flipped Image
- Index(es):
Relevant Pages
|