You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Detection costs more CPU per request in 4.4.0 than in 4.3.x #172
Since 4.4.0 every request costs noticeably more CPU, even when requests run one at a time. On a realistic POST (JSON body, browser headers, a bearer token) I measured about 209 ms of CPU per request on 4.4.0 against about 148 ms on 4.3.1, with the same number of pattern checks. The per-request scan time budget reads the thread CPU clock twice and enters a context manager for every pattern check (about 57k clock reads per request), and the 2 ms event-loop slice restarts for every scanned value, so it rarely fires and responsiveness comes from per-pattern thread pool round trips instead. Separately, the performance monitor recomputes the variance with a per-element Python loop on every pattern check and sanitizes anomalies even when no callback is registered. I am charging the budget once per pass with a request-scoped slice and making the monitor statistics cheaper, without changing any detection result.
Activity