Botania

Botania

133M Downloads

Please don't attach a capability to every `ItemStack`

Technici4n opened this issue ยท 4 comments

commented

I may be wrong, but this looks extremely suspicious: https://github.com/Vazkii/Botania/blob/862a9d5e8d76268b89021d2092d53ab58a543ca5/src/main/java/vazkii/botania/client/integration/quark/QuarkCompat.java#L39

It appears that this might be destroying performance of AE2, please don't do that.

commented

After more investigation, it looks like the issue is much worse on the forge part of the event than the botania part, so optimizing this will not change much. Sorry for the inconvenience.

commented

unfortunately, as you've found out the capability system is quite heavy on itemstacks. It's an additional allocation and event dispatch on every single itemstack constructed.

commented

Yes, it seems that caching item stacks as much as possible is the way to go.

commented

Still could probably limit the attaching to poppies and Botania flower classes, though? It probably won't help much in this case however.