Server: the allocation sources left after #3164 (NPC scope frames, status-effect snapshot, guild member views, cast rows)

未关闭
#3,291 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
25/100
Issue 类型
重构
描述清晰度
需要澄清
活跃度
活跃
技术栈
go

调研方向

Start with the open parts: statuseffect.(*Registry).Snapshot, store.storeGuildDoor.guildMemberViewsLocked, and the cast rows in domain/social.go. For each, check which callers hold the returned copy and whether it can be shared. Run the 200-NPC/1200-published benchmark before and after each change. Done means each part reports B/op and allocs/op deltas. The open questions are design calls, so confirm the approach with maintainers first.

由索引模型根据 Issue 内容生成。

描述

area: server enhancement priority: high

Follow-up to #3164: the server allocation sources it left open.

#3164's large rows are merged:

  • Character copies: #3169, #3223, #3106, and the staged bag rows in #3285.
  • Ground drops: #3194's per-division delta journal.
  • The commit path: the digest skip, #3229 and #3106.

The audit in #3285 names what stays.

Parts

  • simulation.NpcScopeFrames (2.8 % of allocated bytes on the live profile): reuse or recompute per tick? Called from Ticker.runSessionLegs. Reuse - #3327: one NpcScopeBuffer per division tick state, carried across the sequential session legs; steady state 19,450 -> 447 B/op, 6 -> 0 allocs/op (200-NPC/1200-published bench fixture).
  • statuseffect.(*Registry).Snapshot (2.2 %): which readers need a fresh copy?
  • store.storeGuildDoor.guildMemberViewsLocked (1.9 %): guild door paths.
  • The cast copy's rows (domain/social.go snapshots): taken fresh per snapshot, with no previous copy to share against.
  • Re-profile the live server after the next release, using #3164's method: loopback heap profile, allocated bytes per source.

Done when

  • Each part reports its own before and after (benchmark B/op and allocs/op).
  • The post-release live profile shows the allocation rate under #3164's 110 MB/s, with the new top sources listed.
主要语言
Go
星标
97
派生
61
平均合并
4 小时 14 分钟
30 天内合并 PR
913

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

opensro-dev/opensro 的其他 Issue

查看 opensro-dev/opensro 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。