Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

By reference string comparison in template cache #1947

Merged
merged 2 commits into from Oct 9, 2023

Conversation

epeshk
Copy link
Contributor

@epeshk epeshk commented Aug 21, 2023

Related issue: #1946

@nblumhardt
Copy link
Member

How would the numbers come out if we ditched the fall-through to the by-value cache?

There's a good case to be made for reducing memory use by dropping the second dictionary; anyone who is formatting message "templates" dynamically is probably not actually using message templates and is likely to be generating unique strings anyway, so the situations that will actually benefit from the second layer of caching are pretty limited.

@epeshk
Copy link
Contributor Author

epeshk commented Oct 2, 2023

Yes, I agree that it's better to remove by-value cache completely

@nblumhardt
Copy link
Member

LGTM 👍

Interested whether anyone else can spot gotchas I might have missed so will leave this a few more days.

@nblumhardt nblumhardt merged commit 88f76a8 into serilog:dev Oct 9, 2023
1 check passed
@nblumhardt nblumhardt mentioned this pull request Nov 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants