Security Craft

Security Craft

54M Downloads

Lag spikes

HeberonYT opened this issue ยท 1 comments

commented

Hello, we have a lot of time using your mod, which we find very entertaining. But for a few days we have noticed that certain blocks of the mod, cause a large spike in lag, attached tests of it.
Screenshot_9

As seen in the report, the "retinal scanner" blocks cause a long delay to the server using 49% of the cpu, it seems that it happens when it consults with the authentication service to obtain the data.

full report: https://spark.lucko.me/#kthGdU6NVj

commented

Take these aspects as a suggestion:
1- Using another api to obtain the skin (see https://minotar.net/) only requires the username, it will even be a way to support servers running in offline mode.
2- Make the request asynchronously.
3- Save the local texture. This would prevent the api from saturating, and it won't consume too much time on many connections, you can set in the settings to be customizable, get the skin once a day, get the skin when the player connects, etc.