serilog-contrib / serilog-sinks-richtextbox

A Serilog sink that writes log events to a WPF RichTextBox control with colors and theme support
Apache License 2.0
108 stars 25 forks source link

Added thread for message processing #14

Closed Skaptor closed 2 years ago

Skaptor commented 3 years ago

I took the embedded state machine approach and made a state machine based thread that waits roughly 25ms or a message counter to reach a certain batch size for reducing the amount of dispatcher calls. I ran the tests and nothing broke 👍. It is noticeable faster than calling the dispatcher method for each message that is being logged. All suggestions are accepted.

CLAassistant commented 3 years ago

CLA assistant check
All committers have signed the CLA.

augustoproiete commented 3 years ago

Thanks @Skaptor ! Looks promising. Will take a deeper look in the next few days :+1:

Skaptor commented 3 years ago

Sure I'll make the adjustments. I maybe broke something because I used the vscode web version

TonyValenti commented 3 years ago

Hi! What's the status of this? Really hoping for an update.

Skaptor commented 3 years ago

Changes are ready, we are waiting for @augustoproiete to approve the latest PR.

augustoproiete commented 3 years ago

Awesome! @TonyValenti are you able to take this one for a spin?

Skaptor commented 3 years ago

@augustoproiete what are the latest changes you'd like me to make?

TonyValenti commented 3 years ago

@augustoproiete - can you publish an updated nuget package I can use?

augustoproiete commented 3 years ago

@Skaptor None at this point. Will take a deeper look at the code in the next few days

@TonyValenti NuGet package is here (package artifact), unzip into a local feed/folder

Skaptor commented 3 years ago

@augustoproiete OK. agreed.

Skaptor commented 2 years ago

Hello, is there any new update on this?

TonyValenti commented 2 years ago

When will this be committed?

@augustoproiete - If you're not able to maintain this project, can you make me an admin? I have a vested interest in this being advanced.

Skaptor commented 2 years ago

@TonyValenti did you test the artifact nupkg? how did it work?

augustoproiete commented 2 years ago

@TonyValenti See messages above - This needs manual testing, didn't hear back from you since Oct 18th https://github.com/serilog-contrib/serilog-sinks-richtextbox/pull/14#issuecomment-946244158

TonyValenti commented 2 years ago

Thanks! I'll grab the source and do a deep test later today/tomorrow.

augustoproiete commented 2 years ago

@TonyValenti How did the test go? I imagine merging this will have an impact on https://github.com/serilog-contrib/serilog-sinks-richtextbox/pull/32 so might be good to get this one merged first and release a new preview

TonyValenti commented 2 years ago

I wasn't able to figure out how to test it without it being merged. Please merge then I'll review and resolve any issues.

My changes on my PR are minimal to existing code and I'd be surprised if there were any issues that took longer than a second to resolve.

augustoproiete commented 2 years ago

@TonyValenti Download the NuGet package is here (package artifact), unzip into a local feed/folder

TonyValenti commented 2 years ago

This works great.

augustoproiete commented 2 years ago

@Skaptor your changes have been merged, thanks for your contribution :+1:

Skaptor commented 2 years ago

@augustoproiete Happy to help. Thank you for this sink!