java-topology/defects/bevy/patch/CLEAN.md
russell@unturf.com ff6292d067 wave17: postgres-0001/asterisk-0001/haproxy-0001/nginx-0001; postfix+bevy CLEAN
postgres-0001: pg_inherits.c typeInheritsFrom() BFS visited List → HTAB O(1)
asterisk-0001: app_queue.c interface_exists() ao2_iterator walk → ao2_find O(1)
haproxy-0001: http_ana.c cookie-server scan linked-list → eb-tree index O(log S)
nginx-0001: ngx_http_link_multi_headers() O(H²) double-scan → O(H) hash pass
postfix: CLEAN (htable throughout; two marginal LOW admin-bounded candidates)
bevy: CLEAN (FixedBitSet/HashSet throughout; only hardware-bounded marginals)
2026-03-30 07:57:30 -04:00

807 B
Raw Permalink Blame History

bevy — CLEAN

Scanned 2026-03-30. No CWE-407 defects warranting a patch.

Bevy's engineering choices specifically prevent O(N²) patterns:

  • ECS schedule tracking: FixedBitSet throughout — O(1) contains
  • Asset system: HashSet<AssetPath> — O(1)
  • Plugin deduplication: HashSet<String> / TypeIdMap (HashMap) — O(1)
  • Query/filter building: FixedBitSet — O(1)
  • GLTF loader: HashSet for animation_roots, visited, etc.

Marginal candidates all bounded by hardware constants or startup-time:

  • bevy_render/slab_allocator.rs:904: Vec.iter().position() in cleanup path; S,V typically 15
  • bevy_app/plugin_group.rs:300: Vec<TypeId>.iter().find() on duplicate plugins; startup-only
  • bevy_picking/hover.rs:139: Vec<PointerId>.contains() in retain; P ≤ ~11 hardware pointers