Create Fabric

Create Fabric

7M Downloads

Fluid ArrayList performance problem

Abalieno opened this issue ยท 3 comments

commented

Describe the Bug

I'm just writing quests but I've noticed MSPT growing up over time for no reason.

I only have two mechanical pumps doing nothing, but after I broke them it looks like the situation went back to normal.

I don't know how I'd troubleshoot this.

Technician commented:
"yeah you need to report that to Create so they can fix it
it is also partially an issue with the code I wrote for Fabric, but Create is misusing it"

eyjtukj
yukuilul5t
o ;pui;

Reproduction Steps

Two mechanical pumps idling.

It seems to increase over time, because when I log in fresh into it, MSPT looks fine.

Expected Result

MSPT being regular.

Screenshots and Videos

I have a spark profile here:
https://spark.lucko.me/6Ia7bsNfsj

Crash Report or Log

No response

Operating System

Windows 10

Mod Version

0.5.0i

Minecraft Version

1.19.2

Other Mods

No response

Additional Context

No response

commented

You should really not be instantiating a BlockApiCache just to throw it away immediately, however this is also a problem with Fabric. I'll look at possible fixes on the Fabric side. :)

commented

Hmmm, there is not much that I can do about this on the Fabric side. This hook is very strange: https://github.com/Fabricators-of-Create/Porting-Lib/blob/580154ecc58f025678b6dcaa49e8c4fd08cff53e/transfer/src/main/java/io/github/fabricators_of_create/porting_lib/transfer/mixin/common/ServerLevelMixin.java#L19

If you are querying a storage once you should use the API Lookup directly, there is no point in creating the cache then immediately discarding it. (As the cache needs to be kept in memory until GC'ed to correctly receive BE change notifications, which has some overhead).

commented

Definitely not supposed to be created multiple times