Hey,

Brian Crowell wrote:
> Hey, here's a question-- does the remoting framework in Mono forward 
> System.Object calls on MarshalByRefObjects? I'm looking at a stack trace that 
> suggests it does, in which case, that could be a major source of your 
> performance problems in XSP.

Indeed, it does forward the calls, even if the methods are
not overloaded.

Here is what MS does:

        http://msdn2.microsoft.com/en-us/library/h8f0y3fc.aspx

This timing test case reveals the forwarding:

using System;
using System.Reflection;

class Server : MarshalByRefObject
{
         static void Main ()
         {
                 AppDomain ad = AppDomain.CreateDomain ("foo");

                Server s = (Server) ad.CreateInstanceAndUnwrap 
(Assembly.GetExecutingAssembly ().FullName, typeof (Server).FullName);

                TimeIt (new object ()); // lasts almost nothing
                TimeIt (s);             // lasts a couple of secs
         }

        static void TimeIt (object o)
        {
                DateTime b = DateTime.Now;
                for (int i = 0; i < 100000; i++)
                        o.Equals (null);
                Console.WriteLine (DateTime.Now - b);
        }
}


Please file a bug.

Robert

_______________________________________________
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list

Reply via email to