remove more duplicate lookups#4089
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors enclave provider creation in EnclaveDelegate.Crypto.cs to avoid redundant ConcurrentDictionary lookups when initializing providers for different attestation protocols.
Changes:
- Removes duplicate dictionary lookups by assigning the newly created provider directly to
sqlColumnEncryptionEnclaveProvider. - Stores the provider instance into
s_enclaveProviderswithout re-reading it back.
Replace ContainsKey + indexer patterns with TryGetParsetableValue (for connection options) and TryGetValue (for _appDomainKeyHash) to avoid double dictionary lookups, remove variable shadowing, and make intent clearer. Existing logic and assertions are preserved.
|
sorry. i dont know how i missed these on the previous pass |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4089 +/- ##
==========================================
- Coverage 73.22% 64.19% -9.03%
==========================================
Files 280 271 -9
Lines 43000 65722 +22722
==========================================
+ Hits 31486 42190 +10704
- Misses 11514 23532 +12018
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
* remove duplicate lookups in EnclaveDelegate.Crypto.cs * Use TryGet methods to avoid double lookups Replace ContainsKey + indexer patterns with TryGetParsetableValue (for connection options) and TryGetValue (for _appDomainKeyHash) to avoid double dictionary lookups, remove variable shadowing, and make intent clearer. Existing logic and assertions are preserved.
No description provided.