mozilla-services / autopush

Python Web Push Server used by Mozilla
https://autopush.readthedocs.io/
Mozilla Public License 2.0
215 stars 34 forks source link

Defer metric calls to improve latency #1408

Closed jrconlin closed 4 years ago

jrconlin commented 4 years ago

We noticed a sharp update in latency and CPU with 1.56.1. It was suggested that we may benefit by putting markus metric recording into a deferred handler in order to reduce latency.

pjenvey commented 4 years ago

Reopening: there's a bug in the PR: we should be calling deferToThread with a function and arguments, this passes the result of the call