Big edit: I have been able to reliably repeat this by making a dispenser with a redstone clock dispense 64 villagers and then placing in a single zombie. The moment they all recognize the zombie and start moving, the game ticks drop severely. Making a large amount of villagers with work stations and beds does the same thing slowly over time.
Activating glitch:
https://drive.google.com/file/d/1YHU7-vNxjF_s9QRHou1vGKyEshdjEV9R/view?usp=drivesdk
Deactivating glitch:
https://drive.google.com/file/d/1LmGXY-LaKKuAbQsLdCNi5w299yj9CvbG/view?https://drive.google.com/file/d/13RNOHcdBjvKk70VNILhWGAjj3SSmoZvf/view?usp=drivesdk
You can tell the bug stopped as soon as the xp for the zombie appeared.
I loaded up a backup of my main world, ran the command /kill @e [type=villager] and the issue was solved instantly. Everything is working at normal speed now.
________
Smaller edit: Here are some other notable clips I’ve gathered.
Villagers lagging so hard that they unload:
https://drive.google.com/file/d/1SaS8-NOtKav4IkVfWdpQCMrG1wYJfJMM/view?usp=drivesdk
__________________
I am experiencing a horrendous amount of gametick lag near (large amounts of) hoppers and other redstone components working villagers in Bedrock 1.20.30. This was never an issue before this new update in my world. My frames are fine but it's as if the game is working at 1 tick a second. Everything is in slow motion when those chunks are loaded. Mobs move extremely slowly and redstone components also. The day night cycle is also affected. I can move away from those chunks and suddenly the game goes back to normal with mobs moving at normal speed and no issue. What's going on? My game is unplayable around my base now. I have loaded up worlds with large amounts of villagers and they operate fine. I really think it's lag created by redstone components or maybe trapdoors and other nonsolid blocks villagers.
Here are some video clips demonstrating what I’m talking about:
https://drive.google.com/file/d/13cjFAXWCJLKesiCNtYIg28FJ-dvLmAFG/view?usp=drivesdk https://drive.google.com/file/d/1JdvnfA5zRJakSoHd3ptgD9YzPGXG3ujS/view?usp=drivesdk https://drive.google.com/file/d/1quWLJfdRBQ6LG8T8zgSFELhLT6uK1Fgo/view?usp=drivesdk https://drive.google.com/file/d/1tHraAMfSJsjToTKN4hZCw6OhAFvLL7R4/view?usp=drivesdk
Related issues
is duplicated by
relates to
Attachments
Comments


FPS and ticks per second are only indirectly related. Ticks/second is affected mainly by the number of components the game has to "simulate".
Approximately how many redstone components are you using?

It’s hard to give an exact number but I didn’t experience any of these issues in 1.20.20 so I don’t think my current number of hoppers, pistons, etc would be too many for concern. It’s certainly a lot of farms but not enough to make the game crawl to this much of a snails pace. My day night cycle is easily about an hour now.

https://drive.google.com/file/d/13cjFAXWCJLKesiCNtYIg28FJ-dvLmAFG/view?usp=drivesdk https://drive.google.com/file/d/1JdvnfA5zRJakSoHd3ptgD9YzPGXG3ujS/view?usp=drivesdk https://drive.google.com/file/d/1quWLJfdRBQ6LG8T8zgSFELhLT6uK1Fgo/view?usp=drivesdk https://drive.google.com/file/d/1tHraAMfSJsjToTKN4hZCw6OhAFvLL7R4/view?usp=drivesdk
Here are some video clips to watch that demonstrate what I’m talking about! You’ll also notice the villagers in the background basically frozen in time or barely able to take more than a step.

Is the area where this occurs the area that you first loaded into after the update?

Yes, it is the area I logged in for the first time in. A backup of the same world that I hadn’t played in a month also has the same problem even though other worlds of mine don’t, though.

Have you been able to go near villagers in the worlds that don’t have the problem? Some comments on MCPE-175095 relate this kind of slowdown to being near villagers in any world.

Hey, I’ve identified the issue. It is absolutely the villagers. I loaded up a backup, ran the command /kill @e [type=villager] and the issue was solved instantly. Everything is working at normal speed.
Before I did this, I made a world and spawned a bunch of villagers and traded with them. You could notice the lag steadily increasing.

So, all I need to do is kill of my villagers and

I did the /kill @e command and it was in fact the villagers that is causing the slow down.

Fixed!

Work stations being removed: No, lag persists even after relogging.
Beds being removed: Fixes the issue immediately. Going to edit the main post with videos of what I’ve found in my research.
It seems to me like the entire village is able to select a single bed instead of just a single villager. I just watched 64 villagers all link to the same bed and all acquire jobs immediately as a result. Something about the village, not the villagers, is the cause of this bug.

My world has a village at spawn. Removing the beds did nothing.

My world also has a village at spawn yet removing the beds did help. Maybe you missed some?

No redstone components in my world. Large village population though and lag is unbearable.
Windows 10 Bedrock Edition by the way.
Also I created a new world and went to a village with only a few villagers and this was also laggy, less than my more populated one, but still noticeable.
Breaking blocks and interacting with chests etc. takes time to load.
Seems to be villagers in 1.20.30 causing some sort of lag.

It’s almost certainly something to do with beds. My guess is that for some reason villagers are now able to claim already claimed beds, resulting in multiple villagers claiming the same bed every gametick, leading to the resulting loss of performance

breaking all beds in my village of ~35 villagers and all beds in surrounding areas made minimal difference on the extreme lag of block breaking, item dropping and picking up, or mobs moving. So i don't believe it's solely beds in relation to villagers that's causing the game to break, just my experience tho.

I agree it’s more complicated than just beds. I think it has something to do with the village unit getting stuck in some processing feedback loop. Beds are the foundation of the village though so you can definitely improve performance by strangling the village. Bells, beds, and zombies (even without beds/a proper village) all trigger the bug. I would imagine cat/golem spawning calculations also trigger lots of lag. Whatever the issue, it’s apparent that it’s both exploitable (you can make lag switches to make caving or boss fights 10x easier) and genuinely annoying to have to deal with. It’s needs to be patched ASAP.

Any updates on this? Seems like something in 1.20.30 is fundamentally wrong causing extreme lag even in normal gameplay scenarios.

Best thing we can do is keep this bug report as the most active one every single day until it gets fixed. If you want to help more, the next best way is to find further exploits related to it that are even more gamebreaking, like how I made a villager-based lag switch using a zombie and villagers that allows you to slow time down to a halt and defeat the wither at what to him is basically the speed of light, in survival Minecraft.
If you could find a dupe glitch, that would be the holy grail. The point is to force them to take it seriously.

The best thing you can all do is provide new information that might help the developers find the cause of the issue. Simply commenting or constantly editing to "keep the bug report active" is not helpful, and potentially hides more important information. The same goes for "me too" comments. If the issue affects you, please just vote using the "vote link" above and do not add more comments.

I’m also having this issue in a village with 29 villagers.
I believe it’s tied to villagers actively “using” their jobsite blocks. The lag/delay goes away during the afternoon meeting/social time and then comes back as soon as it’s over. It also goes away when they go to bed and everything is normal during the night. But as soon as they wake up and go to their jobsite blocks, the lag is back again.

Their pathfinding has gotten increasingly worse, in terms of causing performance drops, pre 1.20.30. Maybe that's one possible source of the problem.
For example, the farmers still isn't up to date with the farmland & grass path blocks, so they just stare at their target crop. Just 2 farmers getting in each other's way to the same crop can cause massive lag, at least on the switch anyway.

Edit2: Investigated further... it's more specifically ACTIVE pathfinding... the more villagers that have something they want to do... find a bed... escape danger... pick crops... whatever... the game lags tremendously... where as if they are just idle pathfinding... wandering around, the game performance seems to be uneffected, atleast to a noticable degree
Edit: I figured it out! It has to do with farmers either being able to harvest crops, or being able to plant crops (or both). I tested this by trying different single villager profession setups.... and out of my tests. I had no issues at first with any of them, but with the farmers, I decided to temporarily increase the tic rate just to grow the crops, then turn it back down... as soon as crops were harvestable, the world turned to a slideshow... killing off the farmers would fix the issue... adding them back in would bring the issue back.
[media]
I have tested this in my world... and it seems to me like the issue is not directly tied to villagers... but instead tied to entitites...
Example: I go to my 40 villager trading hall, or a smaller village... and I do not get entity lag... things like punching grass or dropping items all happen smoothly and as expected.
I go to an area with a lot of crops planted... and the level of lag is to a point of being unplayable... chests take 5-10 seconds to open... grass can take 5 seconds to break once punched, etc.

theconmcdon: some of your additional videos are misleading.
The “multiple villagers claiming a bed” is not multiple villagers claiming a bed. Since there is no other bed present, the bed you place is triggering creation of a village, which allows all of the villagers there to link to workstations and the bell that is off-camera when you place the bed. The extra particles you see are for those other links.
The first “adding beds” video actually shows the lag being triggered at the end of the afternoon meeting time when the villagers begin to pathfind to their workstations, consistent with what another commenter has described. It is just coincidence that you place the second bed in that video at the same time the afternoon meeting ended.

I removed those clips. Obviously I didn’t know what was happening in those videos because no one else was posting about it when I had made them, but I agree with what I’m reading in the comments here. It always seemed to me that the lag was triggered by “village things”, particularly pathfinding to jobs and beds or shelter. I think I even said that in my post originally and in these comments.

I've done some testing.. it is caused when villagers pathfind. Either to a bed, to a job block, or especially, to avoid a zombie.
Reproduce by grouping a bunch of villagers in a square, build a few 1x1 cages around them and place zombies in the cages. The villagers try to get away and the game lags.
Or, make sure there is at least one bed first, then /fill an area that they can access with a job block. Game lags.

I am having the same issue, its certainly villager related. The closer I get to urban areas the slower the game gets, in the rural areas (or smaller villages) its fine. Everything was fine before this last update 1.20.30.
Edit: also noticed at night when most villagers are asleep the game goes back to normal speed (I saw the redstone ticks slow as well) in urban areas, so thats kind of nice... but yea this last update almost makes the game unplayable, hope it gets solved soon.
Final Edit: Whatever was in update 1.20.31 it seemed to fix the issue with the villagers and the redstone ticks. It works fine for me, thanks team!

Actually if you leave the game. Close app and re-enter everything works fine for a minute but quickly grinds to a halt. Can’t eat in villages but if you leave about 100 blocks you can eat fine. Definitely from the new update. Thanks for helping.
I’ll add that the definition of the drops is amazing. They float in the air and you can walk around them and check em out from every angle.

Following the update to 1. 20.31 my world is working again!

This one seems improved/resolved for me today in the 1.20.31 update. I'm on xBox One S Anyone else?

Not sure what I did wrong to have my 2 comments removed but I agree with osguard, XBox Series X is now on 1.20.31 Build:18258830 working just fine after 2 full daylight cycles and 50+villagers.
I would love to know if it was all Mob related or Villager specific...?

@kcarley - good video here which I think described the problems pretty well inline with what I was experiencing. (Mods please remove of posting youtube vid out of bounds): https://youtu.be/QiRKHzhTNOo?si=fsrAi6bi1-MvX8Uh

EDIT: Without changing anything since the 1.20.31 update, this now seems resolved!
I am still experiencing this on 1.20.31 on Nintendo Switch in a multiplayer server. The game seemingly pauses for 4-5 seconds every 2 seconds or so.
The area that I notice it has:
20 villagers in a trading hall. They are free to roam between their beds and workstations. The entire hall is carpeted if that would affect pathfinding.The automatically spawned in iron golems and cats from the above villagers.~50 cows2 sheep10 bees4 pistons constantly runningHopper minecart constantly moving~60 hoppers

For me, the issue seems to be gone with the update to 1.20.31. No more lag! Everything is working as normal.

For ongoing freezes and situational lag on Android devices please follow MCPE-175116. For other devices please make sure that your app and any server you are connecting to has updated to 1.20.31, and then search for a report that covers your specific situation.

The bug in MCPE-175564 may very well be linked to villagers though.
Reply from @unknown:
It might, or it might not. But in any case, rather than continuing to comment on this (MCPE-175100) report, please try to add more details to your new MCPE-175564 report. It would be especially helpful if you can narrow down what is going on in the world and add that to the Description in that report.

This is not resolved, it's still happening in 1.20.40