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

perf: Delay SignalRelay connection to when a callback is connected #277

Merged
merged 7 commits into from
Feb 21, 2024

Conversation

tlambert03
Copy link
Member

closes #276

Copy link

codecov bot commented Feb 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (e9ee496) 100.00% compared to head (4fdec36) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #277   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           23        23           
  Lines         1906      1926   +20     
=========================================
+ Hits          1906      1926   +20     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

codspeed-hq bot commented Feb 21, 2024

CodSpeed Performance Report

Merging #277 will degrade performances by 11.53%

Comparing tlambert03:delayed-relay (4fdec36) with main (e9ee496)

Summary

⚡ 4 improvements
❌ 1 (👁 1) regressions
✅ 61 untouched benchmarks

Benchmarks breakdown

Benchmark main tlambert03:delayed-relay Change
test_dataclass_group_create[attrs] 2.8 ms 1.7 ms +61.73%
test_dataclass_group_create[dataclass] 2.4 ms 1.3 ms +79.77%
test_dataclass_group_create[msgspec] 2.8 ms 1.8 ms +54.01%
test_dataclass_group_create[pydantic] 3.1 ms 1.7 ms +81.13%
👁 test_emit_time[lambda-2] 109.4 µs 123.6 µs -11.53%

Copy link
Contributor

@Czaki Czaki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally looks ok. One suggestion and one question about the possibility of small improvement.

src/psygnal/_group.py Outdated Show resolved Hide resolved
src/psygnal/_group_descriptor.py Outdated Show resolved Hide resolved
tlambert03 and others added 3 commits February 21, 2024 09:58
Co-authored-by: Grzegorz Bokota <bokota+github@gmail.com>
Co-authored-by: Grzegorz Bokota <bokota+github@gmail.com>
@tlambert03 tlambert03 merged commit ab5dfc5 into pyapp-kit:main Feb 21, 2024
54 checks passed
@tlambert03 tlambert03 deleted the delayed-relay branch February 21, 2024 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

[idea] Connect SignalRelay to signals only when have callback
2 participants