diff options
author | Michal Strehovsky <michals@microsoft.com> | 2016-08-17 02:52:00 +0300 |
---|---|---|
committer | Michal Strehovsky <michals@microsoft.com> | 2016-08-17 02:52:00 +0300 |
commit | e5cfdde1dc74876c09a7ef3fa34acf7be1ae2534 (patch) | |
tree | 7d69fc7e88c2ba503ef5f9250e7e20939867d873 /src/System.Private.Reflection.Metadata | |
parent | 233f9da336ffcb14c20d7aa63019ce0e50eba313 (diff) |
Update metadata reader to be more lazy
Addressing a big known problem of the native metadata reader - allocating way too many arrays (and array enumerators) when reading metadata.
I'm updating the reader generator to generate XXXCollection types that are structs and have a struct enumerator.
I'm specifically not updating the consumers to take advantage of this (i.e. we still sometimes pass the collection as an IEnumerable within the reflection stack). This is because I don't want the changeset to clash with the reflection refactoring work - I would like to push this change into our next release. This makes SharedLibrary.dll 35 kB smaller on x86 because we no longer have the crazy amount of array types implementing all the crazy collection types.
[tfs-changeset: 1622617]
Diffstat (limited to 'src/System.Private.Reflection.Metadata')
-rw-r--r-- | src/System.Private.Reflection.Metadata/src/System.Private.Reflection.Metadata.csproj | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/System.Private.Reflection.Metadata/src/System.Private.Reflection.Metadata.csproj b/src/System.Private.Reflection.Metadata/src/System.Private.Reflection.Metadata.csproj index 91f4648d4..9b2d15076 100644 --- a/src/System.Private.Reflection.Metadata/src/System.Private.Reflection.Metadata.csproj +++ b/src/System.Private.Reflection.Metadata/src/System.Private.Reflection.Metadata.csproj @@ -9,6 +9,7 @@ <AllowUnsafeBlocks>true</AllowUnsafeBlocks> <!-- Ignore the CLSCompliance of the generated cs files we are using here --> <NoWarn>$(NoWarn);3003</NoWarn> + <CLSCompliant>false</CLSCompliant> </PropertyGroup> <!-- Default configurations to help VS understand the options --> |