Open augustoproiete opened 3 years ago
Hi @augustoproiete - Can I pay you to roll in this enhancement and a few others:
@TonyValenti Very interesting ideas. Tracking via https://github.com/serilog-contrib/serilog-sinks-richtextbox/issues/15 and https://github.com/serilog-contrib/serilog-sinks-richtextbox/issues/16 to discuss design. They could potentially be done independently of this issue though definitely related
Any chance you could give me a quote on getting this work done?
@augustoproiete ?
We are having performance problems with longer running apps because this is not implemented. Any chance you can make it happen soon?
@TonyValenti I'll see if I can block some time over the next few weeks, but happy to take a PR if you'd like to give it a go
Any update for this?
I have code that does this and makes the library much more performant but the manager has stopped replying.
Currently, each new log entry appends a corresponding
Inline
object to the lastParagraph
in the RichTextBox.One user reported that writing log entries creating multiple paragraphs seem to have a better performance than creating multiple inlines in a single paragraph once the number of entries is large (the example was ~6000 lines with 4-5 tokens in each entry).
If that is true (needs testing/PoC), then it probably makes sense to switch to using multiple paragraphs by default.
One downside of using multiple paragraphs is that by default the control appends a margin which visually looks like each entry is using two lines instead of one, thus the user would have to remove the default margin of the control:
I don't think the sink should be making any changes to the visual aspects of the RichTextBox control, thus if we go this route, we should document the margin issue above