upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/shims/gameinput.cpp
diff options
context:
space:
mode:
authorRafael <rafaelalvesp2005@gmail.com>2026-11-22 02:02:22 -0300
committerItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com>2026-11-22 00:33:52 -0500
commite3a792c5e297b93dc608854fdaf8731e4c8d15a4 (patch)
tree2c441c1d2ddd6fc8e7e6df83fc438b75cc1e4e27 /runtime/shims/gameinput.cpp
parentd307cf5670204becd41a3893184940de856ebed2 (diff)
world_census: don't count the warm-up window's streams a second time
Each shard starts scanning WARMUP (8 MiB) before its start to land on a real stream boundary. The streams it found there belong to the previous shard, but scan_shard added their streams, stored, inflated and rejected counts anyway; only metadata streams were caught by the later `s < start` check, which is what the "adopted" counter counted. So every total except the map rows grew with the number of shards. On a 1.0.2.1 copy, data.rpf gave 28,509 streams with one shard (rpf9_carve's count), 42,293 with --shard-size 16 MiB and 51,831 with 10,000,019 bytes, with identical map rows. With this change all three give 28,509 streams, 423,279,355 stored and 1,403,250,069 inflated bytes and 638 rejected candidates (1, 29 and 49 shards). A warm-up stream now only moves the scan past its bytes. The adopted counter, which only ever measured the double count, is gone. test_world_census: test_tiny_shards_give_the_same_stream_totals compares every total of a one-shard run with 400-byte shards (the existing tiny-shard test only checked maps, entities and interval coverage, which a union hides). It fails on the old code (inflated 39,312 vs 7,504). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit eb96a79ceb86a56cbc9a654ad7b2d04df1da27a4)
Diffstat (limited to 'runtime/shims/gameinput.cpp')
0 files changed, 0 insertions, 0 deletions