| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
DisableRecording stored ContextId.InstanceId, which a pooled context keeps when it is returned to the pool, so recording stayed disabled for every later lease of that instance. It now stores the whole ContextId, which includes the lease. The ids are also held in a ConcurrentDictionary instead of a ConcurrentBag. ConcurrentBag.Contains copies the bag under a lock, and it ran for every command: about 43 us per command once 1,000 contexts had been disabled.
| Back | FazBrowse Home | New Git URL |
DisableRecording stored ContextId.InstanceId, which a pooled context keeps when it is returned to the pool, so recording stayed disabled for every later lease of that instance. It now stores the whole ContextId, which includes the lease.
The ids are also held in a ConcurrentDictionary instead of a ConcurrentBag. ConcurrentBag.Contains copies the bag under a lock, and it ran for every command: about 43 us per command once 1,000 contexts had been disabled.