/clear command has severe performance drops (increased mspt) when there are items in the player inventory's 2x2 crafting grid. Following the reproduction steps below results in roughly an 11x increase in mspt.
For counting items, /execute if items can be used as a temporary workaround.
Steps to Reproduce:
Create a new void superflat world.
Set up a repeating command block to count items 1024 times per tick using
/clear.
(For example, summon at least 4 entities into the world and put the following command into the command block):/execute rotated as @e[limit=4] rotated as @e[limit=4] rotated as @e[limit=4] rotated as @e[limit=4] rotated as @e[limit=4] run clear @a * 0Change the gamemode to survival.
Place an
oak_logitem into the player inventory's 2x2 crafting grid, and observe the sharp increase in lag (with the F3+2 graph).
Linked issues
relates to 2
Attachments
Comments 2
Thank you for your report!
After consideration, the issue is being closed as Invalid.
This report does not describe a bug.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
Thank you for helping us improve Minecraft! We saved your files: