[Mono-dev] Remoting performance between two appdomains( plugins) in same process/application
lluis at ximian.com
Wed Dec 19 10:47:00 EST 2007
El dc 19 de 12 del 2007 a les 09:03 -0600, en/na Shawn Schaerer va
> I have a question on the performance of remoting between two
> appdomains running in the same process.
> We have developed a dynamic dll loading program (plugins) using
> appdomains and assemblies and need to pass a lot of data between the
> two plugins. We are passing image data between the two
> plugins. The size of the data is around 250K Bytes and the transfer
> happens 15-30 times a second.
> Is remoting optimized when the appdomains are created in the same
> process / application ? ( We are passing the objects using
Yes. The cross-app domain channel can send information to the target
domain by just copying memory. That's faster than any other IPC method.
Also, if the remote methods you call use only primitive types or arrays
of primitive types, the cross-app domain channel can avoid the
serialization of parameters and can make a direct copy of data, which is
> Are the transfers the same as accessing shared memory or is the data
> still accessed via proxies ?
Data is still accessed via proxies, because it is not possible to share
managed objects between domains. If you send a MarshalByRef object
you'll get a proxy to the object in the source domain. If you send a
byte array of 250Kb, the target domain will get a copy of that array.
> Is there a big performance hit doing this in Mono ? Is there a better
> solution ?
A solution for what? for sending information between appdomains? I don't
think there isn't a better solution than remoting.
More information about the Mono-devel-list