主要修复了因大型进度文件(以及游戏中其他位置或其他模组中由通过 DFU 解码大型地图引起的同类卡顿)导致的玩家加入时 TPS 冻结问题。
本模组可以仅在服务端或仅在客户端使用。
修复了 Mojang BaseMapCodec(属于 com.mojang:datafixerupper)在处理基于大型映射的编解码器(Codecs)时的 O(N²) 性能问题。由于该修复直接作用于 BaseMapCodec 本身,因此它适用于所有基于此构建的编解码器——包括 UnboundedMapCodec、SimpleMapCodec 以及其他共享相同 decode/encode 逻辑的代码——而不仅仅是玩家进度。
此 bug 于 1.21 版本引入,并一直存在于后续的现代版本中。
以下是将本模组的修复与原版行为进行对比的基准测试(含相关背景说明):
nekotxs/BaseMapCodec-bench
该修复也已提交至 Mojang 的 DataFixerUpper 上游仓库:
Mojang/DataFixerUpper#110
如果 Mojang 接受了此 PR,则在更新版本中将不再需要本模组。
NeoForge 免责声明
在 NeoForge 上,本模组使用了一些修改 DFU 行为的“黑魔法”技术,这可能导致与其他模组不兼容。如果您发现任何问题,请在 GitHub 上提交 Issue。
已知与 Sodium Extra 不兼容。
此情况仅适用于 NeoForge 版本——Fabric 版本不受影响。
Mainly fixes TPS freeze on player join caused by large advancement files (and the same class of freeze anywhere else in the game, or in other mods, that arises from decoding a large map through DFU).
It is okay to use this mod on server only or client only.
Fixes O(N²) behavior in Mojang's BaseMapCodec (part of com.mojang:datafixerupper) when decoding large map-based Codecs. Since the fix lives in BaseMapCodec itself, it applies to every codec built on top of it - UnboundedMapCodec, SimpleMapCodec, and anything else sharing the same decode/encode logic - not just player advancements.
This bug was introduced in 1.21 and is present up to modern versions.
Benchmarks comparing this mod's fix to vanilla behaviour (with some context) are available here:
nekotxs/BaseMapCodec-bench
The fix has also been submitted upstream to Mojang's DataFixerUpper:
Mojang/DataFixerUpper#110
If Mojang accepts the PR, this mod won't be needed on newer versions.
NeoForge disclaimer
On NeoForge, this mod uses some cursed techniques to modify DFU behaviour, which may cause incompatibility with other mods. If you notice any issues, please open an issue on GitHub.
It is known to be incompatible with Sodium Extra.
This only applies to NeoForge — the Fabric version is not affected.
评论 0
登录后参与评分
还没有评论,来抢沙发吧