Applied Energistics 2

Applied Energistics 2

156M Downloads

Fabric: shift clicking items into an ME system causes noticeable lag

NiChrosia opened this issue ยท 8 comments

commented

Describe the bug

On the fabric version of the mod (AOF4 1.0.1), shift-clicking multiple items into an ME system causes ~1 second lag where the game is unresponsive.

How to reproduce the bug

Open latest (1.0.1 as of now) AOF4, create an ME system, and shift drag over several items into the ME system.

Expected behavior

The game should not freeze for a noticeable amount of time.

Additional details

The mod that provides the ability to shift-drag is mouse wheelie, meaning this issue could be a compatibility one.

Which minecraft version are you using?

1.17

On which mod loaders does it happen?

Fabric

Crash log

https://pastebin.com/X66vw8PQ

commented

Additional note: the amount of lag seems to increase when inputting more items

commented

It does not, I've actually been using that as a workaround. (In response to the p.s., it happens on a normal crafting terminal, with no import/export buses connected.)

commented

Mouse wheelie is notorious for being incompatible with AE2. Does this happen if you just quickly shift click individual stacks?

p.s.: Alternatively, are you by chance inserting into a storage bus on the backend?

commented

We would need a spark profile where the lag spike is visible to have more insight into this issue.

commented

I'm also noticing this issue in 1.18.1 fabric. Able to achieve it on a server, at least for me lag does not appear in single player (drag issue still does tho), with latest AE2, Mouse Wheelie, Spark, and Fabric API.

Situation:

  • When using shift left click drag (which is meant to do only one item stack at a time as shown in beginning of video) into a crafting terminal to quickly transfer stacks into the system, it grabs all of the stacks (which is ctrl left click drag while I used shift left click drag) and then causes a hitch on client.
  • This lag, or more like the issue to be honest is probably because it's transferring all items instead of only the one stack at a time into the terminal like it's meant to.
  • Also strange thing: visible lag only happens with the crafting terminal?

Might not be fixable by you guys idk, but wanted to further expand on this issue as op seems to have not.

Best explained with a clip of it: https://streamable.com/7slkxr

/Spark Log: https://spark.lucko.me/p28XsiLwBk
/Spark Client Log: https://spark.lucko.me/tUm6IRWlU8
(Server log shows 2% from AE in sources. Client, which makes more sense for this lag to be coming from, is at 16% and might be more useful, idk)

commented

Sorry for long comments but to add onto this even more: It's a lot worse with more mods, with a 1.18.1 modset of roughly 200+ mods. Same thing as what is shown as above but causes worse lag.

Also shows how more items cause more lag + a strange feature of mouse wheelie, not an issue tbh but you can left shift click drag on an item and it grabs a bunch of it xD

Clip: https://streamable.com/w4gzt5

/Spark Log: https://spark.lucko.me/Dz0gA1iuu8
/Spark Client Log: https://spark.lucko.me/2yccNAgCxA
(Inventory full of dirt transferred to crafting terminal. Server is at 1% from AE. Client is at 58% from AE)

commented

I think an appropriate solution would be to only search for a recipe once per tick.

commented

This was re-reported on ATM7, and I think I can fix it now by being more smart about recipe lookups.