You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
EventId is immutable class and typically is instantiated as singleton.
Caching log properties based on EventId CreateEventIdProperty may reduce memory usage.
However cache size must be limited in case EventId is generated dynamically
The text was updated successfully, but these errors were encountered:
It's an interesting possibility, but there are often non-obvious performance implications of caching, so we'd first need data showing that there's a substantial allocation overhead to be saved, here, and that the caching can improve on it without other impacts.
Are you using EventId heavily in your own code, or is it mostly framework code that you think will benefit? Cheers!
I run a quick test for one of my app. After running for several minutes under load I found 12K LogEventProperty objects were created / collected. Examining log file I found less than 50 unique event Ids.
EventId is immutable class and typically is instantiated as singleton.
Caching log properties based on EventId CreateEventIdProperty may reduce memory usage.
However cache size must be limited in case EventId is generated dynamically
The text was updated successfully, but these errors were encountered: