Skip to content

Improve LoadAll performance #2

@forrestthewoods

Description

@forrestthewoods

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions