Snownee / Jade

Minecraft mod that shows what you are looking at. (Hwyla fork)
https://www.curseforge.com/minecraft/mc-mods/jade
Other
234 stars 60 forks source link

Jade is lagging my game? #287

Closed MenacingPerson closed 1 year ago

MenacingPerson commented 1 year ago

Mod loader

Fabric

Minecraft version

1.19.4

Mod version

10.4.0

Modloader version

Fabric 0.14.21

Modpack info

(Custom)

If bug:

If bug: The latest.log file

No response

Issue description

To preface this:

I play on a minecraft server called "Wynncraft". It's really cool, but it's not relevant here. I only thought to mention it because it might be relevant.

I get really random lag spikes that go on for a solid minute and are really annoying, so I profiled my client by following https://spark.lucko.me/docs/guides/Finding-lag-spikes and it turns out that somehow Jade is causing lag.

Look at this spark profile (client):

https://spark.lucko.me/5iRsMfM8rE

It's profiled with ticks that take >100ms, during one of those lag spikes.

https://spark.lucko.me/h5kR7DkhIV

Here is a normal profile with no custom options where a lag spike did not occur, and jade is only taking up 1% compared to the 28% in the previous one.

image

All it seems to be doing is converting something to JSON. I wonder how that's causing lag. Is it writing to a file or something?

Or is maybe Jade showing up falsely because it's trying to write to my drive or something and it's getting bottlenecked?

Snownee commented 1 year ago

Can you tell me the file size of config/jade/usernamecache.json?

MenacingPerson commented 1 year ago

it says 4MiB

MenacingPerson commented 1 year ago

It's filled with crap like this btw image

Because of fake players generated by server

Snownee commented 1 year ago

Fixed in 1.20+ but I don't have time to backport it to 1.19.4 in the next few weeks

MenacingPerson commented 1 year ago

Thank you!