[XM] Teach XM resolver to load all of assemblies into memory (#1034)
- Profiling suggesting that loading all of sub-100 MB assemblies into memory is a performance win, and mtouch already does it.
This commit is contained in:
Родитель
c6d7a3adec
Коммит
b5edf16711
|
@ -69,7 +69,11 @@ namespace Xamarin.Bundler {
|
|||
if (cache.TryGetValue (name, out assembly))
|
||||
return assembly;
|
||||
|
||||
assembly = AssemblyDefinition.ReadAssembly (fileName, new ReaderParameters { AssemblyResolver = this });
|
||||
assembly = AssemblyDefinition.ReadAssembly (fileName, new ReaderParameters
|
||||
{
|
||||
AssemblyResolver = this,
|
||||
InMemory = new FileInfo (fileName).Length < 1024 * 1024 * 100 // 100 MB
|
||||
});
|
||||
cache.Add (name, assembly);
|
||||
return assembly;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче