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

Performance-test Dispatcher.sinksFor() function #91

Open
mjstrasser opened this issue Dec 13, 2022 · 1 comment
Open

Performance-test Dispatcher.sinksFor() function #91

mjstrasser opened this issue Dec 13, 2022 · 1 comment

Comments

@mjstrasser
Copy link
Member

The function Dispatcher.sinksFor() calculates the current set of sinks every time a log event is dispatched. This might be very inefficient with large numbers of log events.

Perhaps introduce a simple cache (map) of sinks, keyed by logger name. Considerations:

  • What if there is a very large number of logger names? Could the map grow very large? (YAGNI?)
  • How often might the configuration change? Level configurations can be changed by calling the config DSL in a running application. Perhaps introduce simple cache invalidation? (YAGNI?)
@mjstrasser
Copy link
Member Author

b9b5211 created a simple map cache.

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

No branches or pull requests

1 participant