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

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

问题描述

EntitySlashDim(client/EntitySlashDim.java:60-165):每 tick DestructableSelector + AttackableSelector 双 getEntitiesWithinAABBExcludingEntity,alreadyHitEntity ArrayList 线性 removeAll/contains(O(n²)),命中每实体 10 次 spawnParticle;SA_3/SA_7 触发路径同样使用 10 轮逐步扩大 AABB 的 getEntityToWatch 模式。
建议:已命中集合按 EntityId 用 Set;目标搜索单次扫描替代循环。

### 问题描述 **EntitySlashDim**(client/EntitySlashDim.java:60-165):每 tick DestructableSelector + AttackableSelector 双 getEntitiesWithinAABBExcludingEntity,alreadyHitEntity ArrayList 线性 removeAll/contains(O(n²)),命中每实体 10 次 spawnParticle;SA_3/SA_7 触发路径同样使用 10 轮逐步扩大 AABB 的 getEntityToWatch 模式。 建议:已命中集合按 EntityId 用 Set;目标搜索单次扫描替代循环。
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:44 +00:00
layue13 changed title from [性能][中] SA 实体/特效的重复 AABB 全量实体扫描与 O(n²) 已命中列表(Drive 模板通病) to SA 实体/特效的重复 AABB 全量实体扫描与 O(n²) 已命中列表(Drive 模板通病) 2026-10-06 21:07:44 +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-pseudoedge#1