Managed to unmanaged perforformance - opinions sought

  • Thread starter Thread starter Toadfather
  • Start date Start date
T

Toadfather

Hi all

Exiting COM ATL DLL wrapping a C++ library. Interoping from a C#
application, passing a large string containng XML (5-130kb). Need to
significantly improve performance of both the interoping and the
performance of the native functions (performance critical app).

Opinions sought on most worthwhile course of action...have identified 4
options...

1. Implement a managed C++ wrapper and link to underling C++ functions,
marshalling non-native types where necessary. Thus eliminating COM
(quick win?)
2. Re-write C++ code in C#. (no quick win, not possible to re-write all
of it also)
3. Recompile C++ code with VC7 or higher (currently VC6)...quick win?
4. Re-architect C++ code (no quick win)

Thanks all
 
Toadfather said:
Hi all

Exiting COM ATL DLL wrapping a C++ library. Interoping from a C#
application, passing a large string containng XML (5-130kb). Need to
significantly improve performance of both the interoping and the
performance of the native functions (performance critical app).
And you have profiled that the com-interop is the bottleneck?

Lots of Greetings!
Volker
 
You are right in your implication that the bottleneck is not
neccesarily the marshaling. In fact, analysis done today has shown this
to be the case. However, am still intrigued as to performance
considerations between managed and unmanaged code in general. For
example, you might thing COM is slower than marshalling to a native
exported function from a DLL, but this; certainly in our case; doesnt
seem too be the case!

Thanls for replying!
 
Back
Top