more performance issues

1 view
Skip to first unread message

Dirk Bonne

unread,
Oct 30, 2009, 1:13:12 PM10/30/09
to mono-...@googlegroups.com
Hi

Sorry to bother you again about performance, but I just did a profile on our assembly generator and a lot of time goes into getting the properties values and calling methods of the Type object using reflection. Examples are in ReflectionHelper:

        public static bool IsGenericType (Type t)
        {
            return GetProperty (t, "IsGenericType");
        }


What is the reason for calling members of Type using Invoke? The library could be faster if a direct call is made. I did a test by changing all the reflected calls in ReflectionHelper.cs and our generator got 20% faster (after the change saving the assembly takes now takes most of the time: 65%).

regards
Dirk


Reply all
Reply to author
Forward
0 new messages