pyapp-kit / psygnal

Python observer pattern (callback/event system). Modeled after Qt Signals & Slots (but independent of Qt)
https://psygnal.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
84 stars 13 forks source link

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

Closed tlambert03 closed 8 months ago

tlambert03 commented 8 months ago

closes #276

codecov[bot] commented 8 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codspeed-hq[bot] commented 8 months ago

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%