Uh oh!
There was an error while loading. Please reload this page.
Enable trim analysis and fix warnings - #1216
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| { | ||
| return _hash.ComputeHash(input); | ||
| #if !NET462 | ||
| using var hash = IncrementalHash.CreateHash(_hashAlgorithmName); |
There was a problem hiding this comment.
Would we benefit (performance wise) from creating the hash in the ctor and reusing it here.
Please create a small benchmark to help us decide.
There was a problem hiding this comment.
In addition to my other comment: this is a correctness fix, not a performance improvement. I would rather work on other things than to run a benchmark for such a change. Sorry for being blunt.
There was a problem hiding this comment.
So maybe let's move the hash creating to the constructor. What do you think? this is the last change and I will be able to merge it.
Uh oh!
There was an error while loading. Please reload this page.
I don't know how IsTrimmable works with references (i.e. to SshNet.Security.Cryptography)
WojciechNagorski
commented
Dec 15, 2023
I will review this next week. |
| { | ||
| return _hash.ComputeHash(input); | ||
| #if !NET462 | ||
| using var hash = IncrementalHash.CreateHash(_hashAlgorithmName); |
There was a problem hiding this comment.
So maybe let's move the hash creating to the constructor. What do you think? this is the last change and I will be able to merge it.
WojciechNagorski
commented
Feb 22, 2024
This issue has been fixed in the 2024.0.0 version. |
While the library is not really so modern as to think about trimming and AOT, with the default behaviour to trim all assemblies when trimming an application we have seen issues such as #1167, and I believe #859 (comment) is related.
Fortunately it does not require many changes.