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

feat: only construct handlers once #175

Merged
merged 11 commits into from
Dec 8, 2022
Merged

feat: only construct handlers once #175

merged 11 commits into from
Dec 8, 2022

Conversation

bdraco
Copy link
Member

@bdraco bdraco commented Dec 8, 2022

When bleak is using passive scanning each message would cause a method handler to be constructed via _make_method_handler

Only construct them once.

@codecov
Copy link

codecov bot commented Dec 8, 2022

Codecov Report

Base: 82.11% // Head: 82.15% // Increases project coverage by +0.03% 🎉

Coverage data is based on head (de38a00) compared to base (2fa7cdb).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #175      +/-   ##
==========================================
+ Coverage   82.11%   82.15%   +0.03%     
==========================================
  Files          27       27              
  Lines        3137     3144       +7     
  Branches      647      649       +2     
==========================================
+ Hits         2576     2583       +7     
  Misses        343      343              
  Partials      218      218              
Impacted Files Coverage Δ
src/dbus_fast/message_bus.py 71.27% <100.00%> (ø)
src/dbus_fast/service.py 88.58% <100.00%> (+0.28%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@bdraco
Copy link
Member Author

bdraco commented Dec 8, 2022

Tested in production with passive scanning.

Much better.

There are still parts that search the whole message for fds and will never do anything.

@bdraco bdraco marked this pull request as ready for review December 8, 2022 21:27
@bdraco bdraco merged commit fb4d540 into main Dec 8, 2022
@bdraco bdraco deleted the handler_once branch December 8, 2022 21:27
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.

1 participant