FastMapCodec
by neko_L
FastMapCodec replaces Mojang's BaseMapCodec decode logic with a faster version, fixing a slowdown that large map-based codecs hit when decoding through DataFixerUpper.
What it does
Large map-based codecs in vanilla Minecraft decode in O(n²) time because of how BaseMapCodec is written in DataFixerUpper. Because the fix sits in BaseMapCodec itself, every codec built on top of it benefits, including UnboundedMapCodec, SimpleMapCodec and anything else that shares the same decode and encode path. The main case the mod addresses is a server freeze when a player joins, caused by very large advancement files.
The slowdown appeared with the 1.21 release and carries over into every later version. The mod works on Fabric and NeoForge across 17 release versions, 1.21 – 26.3, and is released under the MIT License as open source. Either side can run it and neither needs it. Benchmarks comparing the fix with vanilla behaviour are included in the project, along with context about the test conditions.
The same fix has been submitted upstream to Mojang's DataFixerUpper, and Mojang has accepted the pull request, so newer versions of the library will not need the mod. Until then, the mod has a known conflict with Sodium Extra, so the two should not be combined without testing.
Key features
Faster map decoding
Replaces the decode implementation of BaseMapCodec with a version that avoids the quadratic cost of large maps.
Advancement freeze fix
Targets the server freeze when players join, which large advancement files cause during decoding.
Shared codec coverage
Because the fix lives in the base class, codecs that inherit its decode and encode logic receive it as well.
Upstream fix
The same change has been submitted to DataFixerUpper, and the author notes that Mojang accepted it.
Compatibility
Latest build for each game version and loader.
26.x5 of 5 versions with builds
1.21.x12 of 12 versions with builds
Only full game releases are shown. This mod publishes no snapshot builds.
Use cases
Servers with large advancement data
Server owners whose players hit freezes on join from big advancement files can install the mod on the server to reduce them.
Modpacks with heavy codec use
Packs where other mods decode large map-based codecs through DataFixerUpper may see freezes elsewhere, and the fix applies to those codecs too.
Who it’s for: Server owners and modpack authors who see slow decoding of large map-based data in 1.21 and later. Players on single-player clients can install it as well, since either side can run the mod alone.
Questions
Does FastMapCodec need to be installed on both sides?
Which loaders does FastMapCodec support?
Will FastMapCodec conflict with Sodium Extra?
In the catalog
FastMapCodec is one of 3,545 Optimization mods on ModsFinder, and one of 2,575 Optimization mods for Fabric. 8,071 mods support Minecraft 26.3.
Similar mods
What the author says
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.
Official listing
- Modrinth page
- modrinth.com/mod/fastmapcodec
- Owner
- neko_L
- Published
- 2026-08-03
- Updated on Modrinth
- 2026-08-18
- Facts verified
- 2026-10-15
