Hi

When Importing symbols (FieldReference, MethodReference, etc..) cecil gets
very slow when the number of references already in the Module is great.
Cecil searches the MemberReferences list linear to see if that reference was
already added. This is very slow. I made a test when generation a largish
assembly:
* 48 seconds with a plain cecil
* 6 seconds when I add a HashTable to the MethodReferences class for a fast
lookup of the signature.
(note: In this test I already optimized the calling of Import so I only call
it once for every MethodReference)

Is there interest in getting the Import method faster?

I used an additional HashTable, but more memory efficient would be to only
use a HashTable and not a list anymore, but in that case the order of the
references won't be preserved. Is this important? And do the maintainers of
cecil have an interest in me providing a patch?

regards,
Dirk

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

Reply via email to