Please do not reply to this email- if you want to comment on the bug, go to the URL shown below and enter your comments there.
Changed by [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=79074 --- shadow/79074 2006-08-14 18:27:38.000000000 -0400 +++ shadow/79074.tmp.20935 2006-08-14 18:27:38.000000000 -0400 @@ -0,0 +1,76 @@ +Bug#: 79074 +Product: Mono: Runtime +Version: 1.1 +OS: All +OS Details: +Status: NEW +Resolution: +Severity: +Priority: Wishlist +Component: remoting +AssignedTo: [EMAIL PROTECTED] +ReportedBy: [EMAIL PROTECTED] +QAContact: [EMAIL PROTECTED] +TargetMilestone: --- +URL: +Cc: +Summary: Mono places remoting calls for System.Object method + +Description of Problem: +When calling to objects across a domain boundary, the .NET Framework 2.0 +picks out and services the following calls locally: + + - Object.Equals (unless overridden remotely) + - Object.GetHashCode + - Object.ToString (unless overridden remotely) + - static Object.Equals + - MemberwiseClone + +These calls are run locally because they have large performance implications. + +(source: <http://msdn2.microsoft.com/en-us/library/h8f0y3fc.aspx>) + +The problem is that Mono executes these calls remotely as of r63683, +according to Robert Jordan. Even when trying for compatibility with .NET +1.1, this optimization can speed up some remoting scenarios. + +Steps to reproduce the problem: +1. Compile and execute the following program, provided by Robert Jordan: + +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); + } +} + +Actual Results: +Calls to Equals across domains is substantially slower than calls to a +local (non-MarshalByRefObject) object. + +Expected Results: +Calls to Equals, when it's not overridden, should be just as fast in either +scenario. In the above scenario, the framework can return false without +placing the call. + +Additional Information: +This bug could be a source of the performance problems that inspired the +fast-xappdomain paths. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
