Closed RubbaBoy closed 6 years ago
+1 I know of many servers/plugins/maps that take advantage of this feature which would benefit from having this fix implemented into Optifine even if Mojang refuses
+1 Hope this can be solved
+1
+
This looks interesting. It could probably be fixed with some caching.
Testing the bugfix, baseline 600 FPS:
36 diamond hoes with 1560 custom models. Before 120 FPS:
After 500 FPS:
Should the optimization be:
The second option looks best for now.
In my opinion, it should be activated for models with more than 32 overrides.
Yeah, I think the second option would probably be the best. Are you just caching the items to an extent, or are you doing something more complicated?
It is caching the combinations of item values and their corresponding models. The item values are quantized depending on the predicate test values to reduce the possible combinations.
Preview OptiFine 1.12.2_HD_U_E2
The optimization is active for models with more than 65 predicates (the vanilla clock model has 65).
Is the fix effective, FPS before/after?
Yeah, just tested it, I got an additional 500 FPS in some tests, thank you very much! I think a lot of people will be able to use feature/fix this with maps and resourcepacks.
After implemented this, Latest OptiFine incompatible with Forge 2729 (latest).
Updated preview E2 for 1.12.2 to be compatible with Forge #2729.
There has been a bug/issue in the game for nearly two years now, in which Mojang has refused to fix ever since it was reported here. It had to do with many predicates heavily lagging the game (By several hundred FPS for many users), as a certain part of a class mentioned in the comments looped through each predicate per item per tick. This is demonstrated in this video, showing the substantial difference this bug makes. I believe these repeated iterations could be cached, to reduce the amount of looping that had to be done.
Mojang has only marked this as "Works As Intended", and the reason is thought to have been because with taking such a feature to its limits and so far away from the actual game like this, it comes with a price, and Mojang doesn't want to invest time into fixing it for this reason. If they have an official statement on this issue I missed, I would love to see it, these words did not come from them, I don't want anything thinking they said this (Other than marking the bug as "Works As Intended").
I've talked to several map makers and resourcepack creators, and several of them have had to drop models because of the amount of lag it created, and the sheer amount of models and textures they had.