When you use .NET Remoting to communicate using custom objects between processes, you can suffer a performance penalty if you do not perform custom serialization on those objects.
Why? The default serialization is a generic implementation that includes all of the CLR type information for each object. This is needed to reconstruct the object on the receiving end of the remoting call.
This isn't a really big deal if you are only communicating single objects at a time and infrequently. This does become noticeable if you are returning custom collections that contain many objects or your application is really chatty.
Ok, so how do you improve the performance? Implement ISerializable on your objects and collections. It's a little tedious, but easy to do. Someday I may write an addin to do this work for me, but currently I use a code generator for my objects that includes this.
There are 3 things you need to do. In the example below, we are going to serialize the object as a byte[]. This serialization will be automatically called by the Remoting formatter when sending the object over the wire.
More...