Hi Charlie,

Nice to have you on the list.

On 7/23/07, charlie <[EMAIL PROTECTED]> wrote:
> I just joined this list because I've been thinking about using Cecil
> in NUnit, to replace most of the Reflection that is done to discover
> tests. With .Net 2.0, load times became much greater, with most of it
> being spent in GetCustomAttributes, and I'm wondering if I should make
> this conversion more of a priority.
>
> Has anyone done timing comparisons that would indicate whether I can
> expect a performance improvement? If the answer turns out to be yes,
> then converting to Cecil will get a higher priority. Everything NUnit
> currently does is readonly: finding classes and methods, getting
> custom attributes and getting property values.

I'm not aware of any performance comparison between Cecil and
Reflection. A gust feeling would be that the time to load an assembly
is longer in Cecil, but then, for operations like discovering methods,
and reading custom attributes, it should be faster. But again, it's a
gust feeling. But I think it's worth planning. I know that the author
of NDepend plans to replace everything Reflection with Cecil, but we
don't have any data yet about the gain (or loss).

One concern though, with Cecil you can not invoke a method, or create
an instance of a type, so you would have to load the assembly
containing the tests anyway, and to have an helper, to get for
instance a S.R.MethodInfo from a M.C.MethodDefinition.

Anyway, I you feel like prototyping to include Cecil in NUnit, feel
free to contact me directly, so I can help you in this effort.

Best regards,

-- 
Jb

--~--~---------~--~----~------------~-------~--~----~
--
mono-cecil
-~----------~----~----~----~------~----~------~--~---

Reply via email to