Simple Voice Chat

Simple Voice Chat

46M Downloads

Client issue with Username cache - Performance

PedroMPagani opened this issue ยท 1 comments

commented

Confirmation

  • I have read the wiki

Bug description

Currently the cache is full on JSON, this is mostly not that big of an issue at first, the main issue is though. How the cache saves on every new state of player. The higher the cache for the usernames, the longer it'll block, and this runs on netty.
I think it would be nice to push a fix or some different work task to save instead of every entry updated causing possible overhead on the netty threads, or
a less performant but still better is to not cache the map directly with json but instead append new entries to the file per line or so, that way at least it won't be a full rewrite every time that a person uses the voice chat, which is a big issue.

Minecraft version

It seems to be a method in all of them

Mod/Plugin version

1.21 (it

Mod/Plugin loader and version

Fabric

Steps to reproduce

Just join a server with enough players or try to create a fake cache and this fake cache will already trigger savings, users may experience different behaviors depending on the OS. I found that my experience doesn't suck but I am on arch, when looking at Windows players and tested myself the freezings are very clear

Expected behavior

No response

Log files

https://gist.github.com/

Screenshots

No response