[Mono-bugs] [Bug 316921] AssemblyQualifiedName is slow

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Mar 4 21:47:56 EST 2011


https://bugzilla.novell.com/show_bug.cgi?id=316921

https://bugzilla.novell.com/show_bug.cgi?id=316921#c6


--- Comment #6 from Jonathan Chambers <joncham at gmail.com> 2011-03-05 02:47:54 UTC ---
Using Rodrigo's benchmark adjusted per Robert's comment, AssemblyQualifiedName
does not show as a hotspot. It cumulatively represented 1008 of 400023 ms
(.25%) in a profile run. Is this worth optimizing, or should the bug be closed?

using System;
using System.Threading;

public class Remote : MarshalByRefObject {
    public void Ping (Remote rem, object payload) { rem.Pong (payload); }
    public void Pong (object payload) { }

}

[Serializable]
public class Foo
{
public int A;
public int B;
public string C;
}

public class Driver {
    public static void Main()
    {
        AppDomainSetup setup = new AppDomainSetup ();
        setup.ApplicationBase = ".";
        Console.WriteLine (AppDomain.CurrentDomain.FriendlyName);
        AppDomain newDomain = AppDomain.CreateDomain ("NewDomain", null,
setup);

        Remote rem = (Remote)newDomain.CreateInstanceAndUnwrap (typeof
(Remote).Assembly.FullName, "Remote");

        Remote local = new Remote ();
    Foo f = new Foo();
        for (int i = 0; i < 30000; ++i)
            rem.Ping (local, f);
    }
}

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list