Skip to content

Replace the QuerzNBT with the BlueNBT library#153

Draft
TBlueF wants to merge 5 commits into
granny:v3from
TBlueF:feat/bluenbt
Draft

Replace the QuerzNBT with the BlueNBT library#153
TBlueF wants to merge 5 commits into
granny:v3from
TBlueF:feat/bluenbt

Conversation

@TBlueF
Copy link
Copy Markdown
Contributor

@TBlueF TBlueF commented May 30, 2026

This PR replaces the NBT library from Querz with BlueNBT.

BlueNBT is an NBT (de)serializer library that i wrote originally for BlueMap.
The API is heavily inspired by Gson and the implementation has a heavy focus on GC-efficiency and performance.

I mostly just was testing and playing around and was curious if it would improve Pl3xMap's render-speed.
And i think it did ^^

Very rough performance tests i did:

Minecraft: 26.1.2 Fabric
World: Hermitcraft Season 9 download
Render-Threads: 6 (CPU has 12 Cores)
-Xmx: 16G

For each test i waited until everything was idle and then ran /map fullrender minecraft:overworld.
The server ran on my PC with the IntelliJ Profiler attached.

Pl3xmap with Querz/NBT:

Duration: 52 seconds

Memory:
image

Memory Allocation:
image

Pl3xmap with BlueNBT:

Duration: 38 seconds (73%)

Memory:
image

Memory Allocation:
image

Disclaimer

I offer this change as is. It ran very nicely in the few tests i did but i have not tested this extensively or on other platforms or with other versions.
Since it replaces basically the very core of Pl3xMap's world-loading i would not be surprised if there are some issues hidden somewhere that i haven't found :D

Due to the lack of proper testing i have set this PR to be a "Draft" for now..

From my side this was just an experiment out of curiosity, so i probably won't do any more extensive testing on this.
I still want to offer it, so if you want to do more testing and potentially use it or just close and dismiss the PR is completely up to you guys :D

Happy mapping <3


Download the pl3xmap jar for this pull request: pl3xmap-153.zip

Copy link
Copy Markdown
Owner

@granny granny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extremely welcome change! I've been wanting to do this since I saw that you made BlueNBT 😄. From a quick glance I don't see any obvious issues with these changes. I'll add the build-pr-jar label so others can test it out!

Would also appreciate if @BillyGalbreath took a glance as well.

Comment thread core/build.gradle.kts Outdated
Comment thread core/src/main/java/net/pl3x/map/core/world/BlockStateDeserializer.java Outdated
@granny granny added the build-pr-jar Enables a workflow to build Pl3xMap jars on the pull request. label May 31, 2026
TBlueF and others added 3 commits June 1, 2026 00:27
Copy link
Copy Markdown
Contributor

@BillyGalbreath BillyGalbreath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, other than the remnants of lombok versions

Comment thread gradle/libs.versions.toml Outdated
Comment thread gradle/libs.versions.toml Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build-pr-jar Enables a workflow to build Pl3xMap jars on the pull request.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants