Querz / NBT

A java implementation of the NBT protocol, including a way to implement custom tags.
MIT License
182 stars 48 forks source link

Performance improvements #47

Closed prydin closed 4 years ago

prydin commented 4 years ago

After running my code in JProfiler, I found that a lot of time was spent in the numeric array reading methods. It turns out that length() and getValue() on the array tag were called tens of millions of times. Optimizing this part of the code cut the time to load a 1000x1000 map by 2-4 seconds.

coveralls commented 4 years ago

Coverage Status

Coverage increased (+0.03%) to 89.352% when pulling e6cb656de42ac5eef551f14e4367e9e777eca6fe on prydin:prydin-heightmap into c66dd6d8ed953b8268bd0c091048ec300579b146 on Querz:master.