SA 实体/特效的重复 AABB 全量实体扫描与 O(n²) 已命中列表(Drive 模板通病) #1

Closed
opened 2026-09-03 14:50:38 +00:00 by layue13 · 1 comment
Owner

问题描述

EntityDriveCure/EntityDriveAlt/EntityDriveBurst(SA/entities/,59-254 行区间):同一 Drive 模板——每 tick DestructableSelector + AttackableSelector 双扫描,alreadyHitEntity ArrayList O(n²) removeAll/contains,命中后每实体 10 次 spawnParticle。SAhomerun 等 SA 触发时多实体齐发。
建议:已命中集合改 Set;多实体齐发时共享一次 AABB 扫描结果。

### 问题描述 **EntityDriveCure/EntityDriveAlt/EntityDriveBurst**(SA/entities/,59-254 行区间):同一 Drive 模板——每 tick DestructableSelector + AttackableSelector 双扫描,alreadyHitEntity ArrayList O(n²) removeAll/contains,命中后每实体 10 次 spawnParticle。SAhomerun 等 SA 触发时多实体齐发。 建议:已命中集合改 Set;多实体齐发时共享一次 AABB 扫描结果。
Author
Owner

Archive 组织仓已过时(Daniel 2026-09-23),整组织 issue 统一关闭。

Archive 组织仓已过时(Daniel 2026-09-23),整组织 issue 统一关闭。
layue13 added the
type
perf
priority
p2
labels 2026-10-06 21:07:42 +00:00
layue13 changed title from [性能][中] SA 实体/特效的重复 AABB 全量实体扫描与 O(n²) 已命中列表(Drive 模板通病) to SA 实体/特效的重复 AABB 全量实体扫描与 O(n²) 已命中列表(Drive 模板通病) 2026-10-06 21:07:42 +00:00
This repo is archived. You cannot comment on issues.
No labels
priority
p2
type
perf
1 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Archive/slashblade-lostblade#1