mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-11-29 22:14:50 +03:00
ea80681eb2
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