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

Improve monitor performance #288

Conversation

cbrand
Copy link
Contributor

@cbrand cbrand commented Mar 24, 2022

Description

Cache via a WeakKeyDictionary the str names of tasks and streams. This greatly reduces iterations as this code path takes 50% of the iteration loop on streams in the _py_aiter function in my use case.

Note: Before submitting this pull request, please review our contributing
guidelines
.

@cbrand cbrand force-pushed the feat/performance-improvements-on-monitor branch from f7345ce to c0e211a Compare March 24, 2022 09:32
cache via a weak key the str names of tasks and streams.
This greatly reduces iterations as this code path takes 50%
of the iteration loop on streams in the _py_aiter function.
@cbrand cbrand force-pushed the feat/performance-improvements-on-monitor branch from c0e211a to 5446529 Compare March 24, 2022 09:34
@cbrand
Copy link
Contributor Author

cbrand commented Mar 24, 2022

I am a bit confused regarding the flake8 issues. It doesn't touch any of the code I changed.

Also, running flake8 locally seems to not issue any of these errors for some reason. Did something change recently?

@cbrand cbrand force-pushed the feat/performance-improvements-on-monitor branch from c034208 to cf92209 Compare March 24, 2022 09:46
@cbrand
Copy link
Contributor Author

cbrand commented Mar 24, 2022

Added cf92209 fixing the flake8 issues.

They have nothing to do with the changed code base so I decided to put them in an own Commit. Please verify.

@patkivikram patkivikram merged commit 63af9f5 into faust-streaming:master Mar 28, 2022
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.

2 participants