Files
mirror-3x-ui/internal
Hamed ea80681eb2 perf(traffic): size live client deltas by active rows (#7265)
splitMovedClientTraffics reserved room for every registered client before filtering down to the ones that moved bytes. On a large panel where almost everyone is idle, that was megabytes of unused slices and map buckets on every five-second poll.

Count the moved rows first and size the slices and the email set from that count. Order, set membership, zero-delta filtering and the non-nil empty results are unchanged. Measured here at 50,000 rows with 1% active: 2.95 MB -> 39.6 KB and 109 -> 60 us per call; with every row active it costs about 4% more time for the same allocations.

Fixes #7262
2026-11-29 16:48:36 +03:30
..
2026-10-25 20:08:14 +01:00