OctopusDeploy / Halibut

| Public | A secure communication stack for .NET using JSON-RPC over SSL.
Other
12 stars 44 forks source link

Remove unnecessary initialization of ILog from calls to LogProvider.GetLogger("Halibut") #426

Closed nathanwoctopusdeploy closed 1 year ago

nathanwoctopusdeploy commented 1 year ago

Background

This PR changes the way ILog instances are created which are used by the InMemoryConnectionLog to improve a performance issue observed in Halibut.

Snippet of pstacks from a Server process dump showing the issue

image

Before this change, an ILog would be constructed for every log message that Halibut wanted to write.

After this change, the LogFactory constructs an ILog which is reused for all InMemoryConnectionLogs and so all log messages halibut writes.

Related to https://github.com/OctopusDeploy/Issues/issues/8266

How to review this PR

Quality :heavy_check_mark:

Pre-requisites

nathanwoctopusdeploy commented 1 year ago

[sc-56658]

shortcut-integration[bot] commented 1 year ago

This pull request has been linked to Shortcut Story #56658: Halibut fix logging thread pool exhaustion.