fts_unity_native_plugin_reloader
fts_unity_native_plugin_reloader copied to clipboard
Improve LoadAll performance
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.
Would also need to check Assembly-CSharp-Firstpass