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

Use AsmResolver for hotloading #716

Merged
merged 3 commits into from
Jun 30, 2023
Merged

Conversation

DiFFoZ
Copy link
Member

@DiFFoZ DiFFoZ commented Jun 30, 2023

And using low-level API for improving performance of hotloading.

BenchmarkDotNet=v0.13.5, OS=Windows 11 (10.0.22631.1830)
AMD Ryzen 5 1600, 1 CPU, 12 logical and 6 physical cores
  [Host]     : .NET Framework 4.8.1 (4.8.9166.0), X64 RyuJIT VectorSize=256
  DefaultJob : .NET Framework 4.8.1 (4.8.9166.0), X64 RyuJIT VectorSize=256


|                      Method |      Mean |     Error |    StdDev |      Gen0 |      Gen1 |     Gen2 | Allocated |
|---------------------------- |----------:|----------:|----------:|----------:|----------:|---------:|----------:|
|                  DnLibWrite | 68.020 ms | 1.0001 ms | 0.9355 ms | 4000.0000 | 1250.0000 | 125.0000 |  23.51 MB |
| AsmResolverReadAndWriteFast |  5.146 ms | 0.0774 ms | 0.0646 ms | 1843.7500 | 1117.1875 | 492.1875 |   9.15 MB |

And use low-level API for improving performance. Thanks to the dev of AsmResolver for helping to improve performance.
Also, store AssemblyName in NuGetAssembly
public Version Version
{
get { return AssemblyName2.Version; }
set { /* ignore set */ }

Check warning

Code scanning / CodeQL

Property value is not used when setting a property Warning

Value ignored when setting property.
public string AssemblyName
{
get { return AssemblyName2.Name; }
set { /* ignore set */ }

Check warning

Code scanning / CodeQL

Property value is not used when setting a property Warning

Value ignored when setting property.
@Trojaner Trojaner merged commit 5d7906b into main Jun 30, 2023
32 checks passed
@Trojaner Trojaner deleted the use-asmresolver-for-hotloading branch June 30, 2023 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants