Traben-0 / Entity_Texture_Features

A Minecraft Fabric & Forge mod that adds random, emissive & blinking textures for mobs, skins and much more!
GNU Lesser General Public License v3.0
132 stars 26 forks source link

Very poor performance (reading from the file system every frame) #74

Closed FoundationGames closed 2 years ago

FoundationGames commented 2 years ago

It appears as though when looking for texture variants, ETF does a resource manager lookup every frame for every entity to find whether there are available variants. This essentially means that ETF is reducing game performance based on the speed of your hard drive or SSD.

A better method would be to resolve available textures during resource reload, and cache those to be checked later during rendering.

Spark profile: https://spark.lucko.me/z9b0Ohaf0A Image of relevant performance hit: image

Traben-0 commented 2 years ago

hmm it should only be doing that check once, it's definetly not meant to every frame, i'll look into it

Traben-0 commented 2 years ago

for the meantime version 3.1.2 should not have this issue, someone else has reported this seem to be only the recent sheep wool support addition

Traben-0 commented 2 years ago

it was a much larger issue, an easy fix though, I am quite surprised it escaped notice for so long, i'll have a fix up tonight

Traben-0 commented 2 years ago

this has been fixed and will be in release 3.1.4 later tonight I will keep the issue open for awareness until then

Traben-0 commented 2 years ago

the fix is up on curseforge and modrinth

Traben-0 commented 2 years ago

thank you for showing me spark btw, this will be very handy