chore: remove MAX_DIRTY_BATCH cap, use MAX_SYMBOLS for dirty symbol set
This commit is contained in:
parent
ccf6ff8670
commit
e6ca8ac624
|
|
@ -172,6 +172,7 @@ bool evaluate_symbol(evaluator_t *ev, uint16_t symbol_idx, int64_t t_sock_arrive
|
||||||
tris->triangle_count);
|
tris->triangle_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (net_bps <= cfg->signal_threshold_bps) {
|
if (net_bps <= cfg->signal_threshold_bps) {
|
||||||
ev->stats.triangles_skipped++;
|
ev->stats.triangles_skipped++;
|
||||||
continue;
|
continue;
|
||||||
|
|
|
||||||
|
|
@ -927,8 +927,7 @@ int ws_client_read(ws_client_t *client, uint32_t conn_idx) {
|
||||||
conn->t_sock_arrive_ms = (int64_t)now_realtime_ms();
|
conn->t_sock_arrive_ms = (int64_t)now_realtime_ms();
|
||||||
|
|
||||||
/* Coalesce: track updated symbols, evaluate once per symbol at end */
|
/* Coalesce: track updated symbols, evaluate once per symbol at end */
|
||||||
#define MAX_DIRTY_BATCH 2048
|
uint16_t dirty[MAX_SYMBOLS];
|
||||||
uint16_t dirty[MAX_DIRTY_BATCH];
|
|
||||||
uint32_t dirty_count = 0;
|
uint32_t dirty_count = 0;
|
||||||
|
|
||||||
// Process all complete frames in the read buffer
|
// Process all complete frames in the read buffer
|
||||||
|
|
@ -986,7 +985,7 @@ int ws_client_read(ws_client_t *client, uint32_t conn_idx) {
|
||||||
|
|
||||||
if (conn->frame_finished && conn->frame_payload_len > 0) {
|
if (conn->frame_finished && conn->frame_payload_len > 0) {
|
||||||
int16_t sym_idx = ws_client_process_frame(client, conn_idx);
|
int16_t sym_idx = ws_client_process_frame(client, conn_idx);
|
||||||
if (sym_idx >= 0 && dirty_count < MAX_DIRTY_BATCH) {
|
if (sym_idx >= 0 && dirty_count < MAX_SYMBOLS) {
|
||||||
bool seen = false;
|
bool seen = false;
|
||||||
for (uint32_t d = 0; d < dirty_count; d++) {
|
for (uint32_t d = 0; d < dirty_count; d++) {
|
||||||
if (dirty[d] == (uint16_t)sym_idx) { seen = true; break; }
|
if (dirty[d] == (uint16_t)sym_idx) { seen = true; break; }
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue