Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Runtime Contexts #537

Merged
merged 8 commits into from
Apr 15, 2024
Merged

Runtime Contexts #537

merged 8 commits into from
Apr 15, 2024

Conversation

Washi1337
Copy link
Owner

@Washi1337 Washi1337 commented Mar 15, 2024

Includes

  • RuntimeContext class, allowing for simulating a runtime environment that shares a single assembly resolver and file service for all loaded modules involved.
  • ModuleReaderParameters::RuntimeContext, specifying which context the module should be read in.
  • BundleAssemblyResolver, allowing for assemblies to be resolved within a BundleManifest.
  • Bugfix for facades assembly resolution on Mono.

Closes #471

@Washi1337 Washi1337 added enhancement dotnet Issues related to AsmResolver.DotNet labels Mar 15, 2024
@Washi1337 Washi1337 added this to the 6.0.0 milestone Mar 15, 2024
@Washi1337 Washi1337 linked an issue Mar 16, 2024 that may be closed by this pull request
@Washi1337 Washi1337 marked this pull request as ready for review April 10, 2024 15:03
@Washi1337
Copy link
Owner Author

Initial testing/benchmarking seems to yield promising perf gains.

Two assemblies in the same context trying to resolve the same System.Object type result in 22% memory consumption reduction:

Method UsingRuntimeContext Mean Error StdDev Gen0 Gen1 Gen2 Allocated
ResolveSystemObjectInTwoAssemblies False 15.968 ms 0.4843 ms 1.4051 ms 1093.7500 1062.5000 906.2500 22.95 MB
ResolveSystemObjectInTwoAssemblies True 9.157 ms 0.1772 ms 0.1570 ms 1031.2500 1015.6250 953.1250 17.68 MB

@Washi1337 Washi1337 merged commit e8055ae into development Apr 15, 2024
1 check passed
@Washi1337 Washi1337 deleted the feature/runtime-contexts branch April 15, 2024 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dotnet Issues related to AsmResolver.DotNet enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

.NET Runtime Contexts
1 participant