fts_unity_native_plugin_reloader icon indicating copy to clipboard operation
fts_unity_native_plugin_reloader copied to clipboard

Improve LoadAll performance

Open forrestthewoods opened this issue 6 years ago • 1 comments

LoadAll currently looks roughly like the following:

foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies()) {
  foreach (var type in assembly.GetTypes()) {
    foreach (var field in type.GetFields() {
      // Do stuff
    }
  }
}

Instead of checking all assemblies it might be better to only check Assembly-CSharp. That would likely work in most cases. But the current code should work in all cases.

I'm open to suggestions on how to improve this. I'm not actually sure it matters. It'd be useful to have benchmark numbers for a large project.

forrestthewoods avatar Sep 01 '19 08:09 forrestthewoods

Would also need to check Assembly-CSharp-Firstpass

dyeo avatar Jul 28 '21 16:07 dyeo