To repro, Fill 5 shulkers full of items, place those five shulkers into a hopper. Face that hopper into an empty shulker. Next steps prove that it isn't client side
Large amounts of lag will occur. The easiest way is to go to another dimension or an area a long way away (as a way to show it is server/host side not client side), and place gravity blocks while the hopper with 5 full shulkers are loaded on a second players device. This will cause entity rubber banding and block placement lag server wide.
Empty or partially full shulkers seem to cause less lag, this leads to the assumption that the data in the shulker is a contributing factor to the lag. Based upon this, the assumption is that the data in the shulker is put a transfer request then canceled ever tick,
https://youtu.be/eTPg_hXs8hM world file is attached.
A gametest was created to directly show the measurable lag. see BedrockTechnicalTestTools.mcaddon
lag:shulker_lag is the test for bring the shulkers in
lag:check_lag uses the time function in java script to measure the time between ticks...
Linked issues
is duplicated by 2
Attachments
Comments 18
did you try on a realm or server? 20 shulkers in this config will cause item transfer rate to reduce to 1 item every 4 seconds? I did put server in the title.
I have uploaded the world, upload the attached world file to a realm or server. i will upload a repro video to youtube in a few minutes and attached the link.
This video explains how easy this is to reproduce. I didnt put it in the BDS or Realms pool because it impacts both. a Jira Admin can move it if they choose.
Thank you for the additional information. I didn't realize you mean BDS/Realm because the local game also has client and server sides and their interaction plays a role in some bugs.
Attached.
Since we don't have access to the sleep time in bedrock (IE how much CPU time the game is taking up) i measure it using Date.now() in java script. If you run that command on consecutive ticks in the game test framework you SHOULD get 50ms. unless all of the Sleep time is used up. In the case of the shulker block lag issue you can use up all of the sleep time pretty easily causing major lag.
I know that on the other side of the Mojang "compile flags" settings wall the MSPT measurements would be actually trivial. But it is extremely hard to prove that something causes lag.... I have no way to measure how sleep time is impacted by things running in the game unless they are completely broken. But for now this one is so bad that even on an I9 with 32 gigs of ram i can lag my game with 6 hoppers and a few shulkers....
I recently did some tests when I was studying the problem of too high MSPT occupancy of the hopper. I used the hook function method to test the execution time of some hopper-related functions.
After observing the test results, I annotated a function called Hopper::_isFullContainer,In most static case(non item pull in or out), the main run time of hopper tick is on this function.
I know that your intention is to determine the hopper situation in advance, so as to reduce the execution of some codes. But unfortunately, your optimization did not have a very good effect due to the low execution efficiency of this function. When dealing with items with nbt, this mspt occupancy is more obvious.
So I hope you can try to optimize the code of this function to improve its execution efficiency.
Here are some of my test results:
conditions | hopper tick time(ms) | full check time(ms) |
---|---|---|
empy hopper | 0.013 | 0.0 |
full hopper (5 full shulker box,same below) | 0.884 | 0.872 |
full hopper points to full chest | 5.289 | 5.287 |
5 full shulkers of enchanted items, pointing into a double chest with 1 item in each slot is also a great way to cause superb amounts of lag.
This bug really needs to be addressed, seeing as how most every storage system will have full hoppers pointing into full chests, at some point. Causing unnecessary lag and affecting gameplay. Because it doesn't affect fps, its nearly impossible for people to discover the source of the lag without previous knowledge of this bug.
@unknown: I have removed your comment and video because they are not relevant to this report. You have not understood what this report is about.
I have removed a lot of your comments from a lot of different reports over the last couple of months. Please make a better effort to fully understand reports. Do not comment unless you have new information to add. See our Bug Tracker Guidelines for guidance. Please use the Mojira Discord to discuss bugs, request update to reports, and ask questions.
I know English is not your first language. If you are not using a translation site/app you may want to consider using one.
I was unable to reproduce this in a small test world (on an iPhone 8 running iOS 13.4.1). I filled 5 shulker boxes with cobblestone and put them into a hopper pointed into another shulker box. Animals and falling sand appeared to move at normal speeds.
Is it possible that the lag you experienced is, instead, the accumulation of multiple resource-demanding events taking place in your world, and the shulker-hopper setup you made was just the last straw? Would you be able to provide a video or test world?