Fps dropping from 600-700~ to 10-20~ when having tools in a hotbar
georg22890 opened this issue ยท 7 comments
Played on 0.10.9.4 version of forgero, there was no issue with fps. Now there is
And as for me, it would be fun to have custom armor in this mod
We are working towards this in the long run, but it's still going to take a while until that will be worked on!
Thanks for the issue! That is really bad.
I believe this is caused by the recent reword to the model predicates, which introduces new conditions for selecting appropriate models. This is likely causing cache invalidations, which makes forgero try to recreate the entire tool model every single frame.
I think this might be solved by extending the cache lifecycle, and marking certain predicates as dynamic. This way we can better sort through only the actual dynamic model templates, and not all available models for every tool each frame.
It will likely require some restructuring in the model renderer, but I think it will solve the issue. I will try to get this done as fast as possible and release it as 0.11.2๐
I created a quick patch for this issue which resolves the most prominent issue due to using uncachable objects for storing the created models. This will also require bigger rework in the future to properly handle model predicates that depend on world state, but that will have to wait for a while, as this issue is to big to be put on wait.
Fps should return to normal when using this patch, but models that depend on world state might be a little inconsistent. I will release this patch as 0.11.2 ๐