Bedrock Wiki
  • Discord
  • Contribute
  • bedrock.dev
  • MS Learn
Beginner's Guide
  • Guide
    • 1. Introduction
      guide
    • 2. Add-Ons Explained
    • 3. Software & Preparation
    • 4. Project Setup
    • 5. Create a Custom Item
    • 6. Create a Custom Entity
    • 7. Blockbench: Modeling, Texturing & Animating
    • 8. Adding a Loot Table, Spawn Rule & Crafting Recipe
  • Extra
    • a. Understanding JSON
    • b. Download Example Packs
    • c. Troubleshooting
      help
    • d. Advanced Manifest
    • e. Format Versions
    • f. Project Setup Android
Animation Controllers
  • Intro to Animation Controllers
    guide
  • Entity Commands
  • AFK Detector
  • Death Commands
  • Molang into Scoreboard
  • Respawn Commands
Blocks
  • General
    • Intro to Blocks
      guide
    • Block Components
    • Block Tags
    • Block States
    • Block Traits
    • Block Permutations
    • Block Events
      Scripts
    • Block Event Migration
      help
    • Blocks as Items
    • Troubleshooting Blocks
      help
  • Visuals
    • Block Culling
    • Block Models
      guide
    • Block Texture Animation
    • Block Texture Variation
    • Block Tinting
  • Tutorials
    • Applying Effects
      Scripts
    • Avoiding State Limit
    • Fake Blocks
      Scripts
    • Ore Loot Tables
      Scripts
    • Precise Interaction
      Scripts
    • Precise Rotation
      Scripts
    • Rotatable Blocks
  • Vanilla Re-Creations
    • Custom Crops
      Scripts
    • Custom Glass
    • Custom Glazed Terracotta
    • Custom Trapdoors
      Scripts
  • Documentation
    • Block Format History
    • Block Shapes
    • Block Sounds
    • Vanilla Block Models
Commands
  • General
    • Intro to Command Blocks
    • Functions
    • Block States
    • Coordinate System
    • Giving NBT Items
    • Scoreboard Operations
    • Understanding Selectors
  • Commands
    • Damage
    • Execute
    • Playanimation
    • Playsound
  • On Event Systems
    • On First World Load
    • On Player First Join
    • On Player Join
    • On Player Leave
    • On Player Death
    • On Player Respawn
  • Scoreboard Systems
    • Entity Counter
    • Scoreboard Timers
    • Comparing And Retrieving Scores
  • Techniques
    • Execute Logic Gates
    • Execute at Block Variant
    • MBE - Max's Block Entity
    • FMBE - A New Way to Create Display Entities
    • Item Drop Detection
    • Look Detection
    • Movement Detections
    • Orbital Camera
  • Useful Creations
    • Compass Display
    • Custom Crafter
    • Multiplayer Position Rearrangement
      function
Concepts
  • contents.json
  • Emojis & Symbols
  • Molang
  • Namespaces
  • Overwriting Assets
  • Raw Text
  • Shaders
  • Sounds
  • Subpacks
  • Text and Localization
  • Texture Atlases
  • textures_list.json
Documentation
  • Shared Constructs
  • Advanced Molang
  • File Types
  • Fog IDs
  • Material Configuration Description
  • Menu Categories
  • Molang Queries
  • Pack Folder Structure
  • Sound Definitions
  • Vanilla Materials
Entities
  • General
    • Intro to Entities BP
      guide
    • Intro to Entities RP
      guide
    • Troubleshooting Entities
      help
    • Entity Events
    • Entity Properties
    • NPC Dialogues
    • Render Controllers
    • Spawn Rules
  • Tutorials
    • Convert Points Between Any Space (World, Entity, Bones)
    • Creating Boats
    • Detecting Other Entities
    • Disabling Team Damage
    • Dummy Entities
    • Entity Attacks
    • Entity Holds Item
    • Entity Movement
    • Entity Timers
    • Flying Entities
    • Introduction to AOE Clouds
    • Invulnerable Entities
    • Look at Entity
    • Sleeping Entities
    • Solid Entities
    • Spawning Tamed Entities
      Scripts
    • Village Mechanic
  • Documentation
    • Dummy Components
    • Non-Mob Runtime Identifiers
    • Projectiles
    • Runtime Identifiers
    • Vanilla Usage Components
    • Vanilla Usage Spawn Rules
Items
  • General
    • Intro to Items
      guide
    • Item Components
    • Item Tags
    • Item Events
      Scripts
    • Item Event Migration
      help
    • Troubleshooting Items
      help
  • Tutorials
    • Custom Armor
    • Custom Food
      Scripts
    • Custom Pottery Sherds
    • Custom Weapons
    • Equipment-Based Commands
    • High Resolution Items
    • Spawning Items
    • Throwable Items
  • Documentation
    • Enchantments
    • Attachables
    • Item Format History
    • Numerical Item IDs
    • Vanilla Item Identifiers
    • Vanilla Usage Components
JSON UI
  • General
    • Intro to JSON UI
      guide
    • Best Practices
      guide
  • Tutorials
    • Adding HUD Elements
    • Aseprite Animations
    • Buttons and Toggles
    • Modifying Server Forms
    • Preserve Title Texts
    • String to Number
  • Documentation
    • JSON UI Documentation
Loot, Recipes & Trading
  • General
    • Trading Behavior
  • Documentation
    • Loot Tables
    • Trade Tables
    • Recipes
    • Item Functions
  • Tutorials
    • Randomized Structure Loot
Meta
  • Add-On Performance
  • Style Guide
  • Useful Links
  • Using Schemas
  • Version Control
  • Q&A
    • Blocks and Items Q&A 2024/08/30
    • Deferred Technical Preview Q&A 2024/02/23
    • GameTest Q&A 2021/08/06
    • Scripting and Editor Q&A 2023/09/22
    • World Generation Q&A 2024/11/15
NBT
  • General
    • .mcstructure
  • Tutorials
    • Experiments in Minecraft Education
    • Extending Structure Limits
  • NBT in Depth
    • About NBT (Named Binary Tag)
    • NBT Libraries
    • Reading NBT Example
Particles
  • General
    • Intro to Particles
      guide
  • Tutorials
    • Disabling Particles
  • Documentation
    • Vanilla Particles
Scripting
  • General
    • Intro to Scripting
    • What is Script API?
    • API Modules
  • Tutorials
    • Block Placement Prevention
    • GameTests
    • Script Core Features
    • Script Forms
    • Script Requests API
    • Simple Chat Commands
  • Documentation
    • Engine Environment
    • Script Resources
    • Script Watchdog
    • Troubleshooting JavaScript
    • TypeScript
Servers
  • Software
    • Bedrock Server Software
  • Protocols
    • Bedrock Protocol
    • NetherNet Protocol
    • RakNet Protocol
Visuals
  • General
    • Introduction to Entity Visuals
      guide
    • Bedrock Modeling
    • Custom Death Animations
    • Effects in Animations
    • Material Creations
    • Materials
    • Math-Based Animations
    • Skin Packs
  • Tutorials
    • Entity Texture Animation
    • Glowing Entity Texture
    • Hurt Animations
    • Leash Position
    • Player Geometry
    • Remove Entity Shadows
    • Retexturing Spawn Eggs
  • Ideas
    • Structure Presentation
World Generation
  • General
    • Intro to World Generation
      guide
    • Biomes
      guide
    • Feature Types
    • Jigsaw Structures
  • Tutorials
    • Block Conditions for Features
    • Generating Custom Ores
    • Generating Custom Structures
    • Generating Patches
    • Heightmap Noise
  • Documentation
    • Biome Tags

Add-On Performance

Contents
Add-On Performance
  • Biomes and Features
    • Biomes
    • Features
  • Blocks
    • Materials
    • Quantity and Type
    • Updates
  • Commands
    • Quantity and Type
    • Selectors
    • Tags vs. Scoreboards
  • Entities
    • Components
    • Dummy Entities
    • Geometry
    • Materials
    • Quantity
  • Lighting
    • Map Considerations
    • Sources
  • Molang
    • Recursion
    • Structs
    • Variables
  • Textures
    • texture_list.json
    • Quantity
    • Resolution
  • Trades
  • Sounds
    • Count
    • Compression
    • Streaming
  • Redstone
    • Chunk Boundaries
    • Command Blocks
  • Ticking Areas
  • Files

WARNING

This page was compiled primarily using community feedback from multiple sources. As a result, some information may be generalized, subjective, or conflicting. Always use your own best judgment when optimizing your add-ons. This page is not a substitute for testing your add-on on a wide range of devices.

Performance in add-ons is crucial, as the most technically fantastic add-on is mainly useless if the majority of the player base cannot experience it. When developing add-ons, it should always be considered that many Bedrock players will be experiencing your add-on on a significantly lower power device than you are developing on. This is especially true for mobile users. Therefore, add-ons should be developed with performance in mind and tested for performance on lower-end devices when possible.

This guide is a non-exhaustive list of specific performance considerations separated by the various subsystems of Bedrock Edition. No single point should be taken as a hard and fast rule. Instead, these performance considerations should help you to recognize potential areas for improvement.

Biomes and Features ​

Biomes ​

  • The biome system is generally efficient
  • Large values for heightmaps are usually handled gracefully
  • The component climate creates large particle storms

Features ​

  • Biomes generally cause less lag than feature generation.
  • Hundreds of iterations per chunk of a multi-block feature have been achieved at a low-performance cost.
  • Thousands of iterations per chunk of multi-block features negatively impact gameplay.
  • Hundreds of thousands of iterations per chunk of a single-block feature have been achieved at a low-performance cost.
  • Thousands of instances of features per chunk comes at little cost.
  • Tens of thousands of feature instances per chunk yields a noticeable impact on chunk loading.
  • Hundreds of thousands of instances of features per chunk slows chunk loading to an unbearable crawl.

Blocks ​

Materials ​

  • The minimum needed material type with regards to rendering should always be utilized

alpha_blend performance is worse than alpha_test, which is worse than opaque

Quantity and Type ​

  • Flowing liquids should be avoided and minimized

Updates ​

  • Block updates should be minimized

Commands ​

Quantity and Type ​

  • Minimize the number of commands run per tick

/effect and /gamemode run every tick are avoidable and have a significant performance impact

  • Large clones, fills and structure loads during runtime should be avoided

Breaking these more extensive operations into multiple commands distributed over multiple ticks will avoid lag spikes, consider using structure loading animations

Selectors ​

  • Care should be taken to ensure a function is not executed on too many entities, and therefore too many times
  • Executing a scoreboard command outweighs the cost of running an entity selector multiple times
  • Using c=1 to ensure the selector stops when it finds one entity may improve performance
  • When executing multiple commands with the same selector, use a function instead to avoid repeatedly resolving the same selector

Tags vs. Scoreboards ​

  • Scoreboards perform better at a large scale than tags

Entities ​

  • Entities generally have one of the most significant performance impacts by subsystem and thus should be minimized where possible

Components ​

  • Pathfinding on flying mobs has a significant performance cost
  • Flying mobs in general encounter performance problems

Faking flying mobs via animation should be considered if possible

Dummy Entities ​

  • Dummy entities generally have equal performance impact to proper entities, except when excluding heavy components like pathfinding

Geometry ​

Bones ​

  • No performance impact has been observed regarding bone count

Elements ​

  • Element count is not generally an issue, except in extreme cases when thousands of elements are reached

Materials ​

  • The minimum material required to achieve the desired effect should always be used
  • When in doubt, refer to the material definition files to get an idea of the costs of various materials, taking the material inheritance system into account

Quantity ​

  • Loaded entities at any given time should be minimized

Below 30 is optimal

Lighting ​

Map Considerations ​

  • Hollow areas will cause lag due to lighting calculations even if you don't see them

Avoid this by filling in unused enclosed areas

  • Keeping the map set to day or night will avoid lighting recalculation

Sources ​

  • Bedrock lighting is calculated dynamically, meaning different light sources have different performance costs

Light blocks are the most performant because they lack particles, rendering, and particular state logic

Torches are a minor performance issue because they emit particles, render, and have particular state logic dependent on what block they connect to

Custom light blocks with minimal components are a reasonable compromise between performance and aesthetics

Comparison Table ​

Light SourceScoreRedstone UpdatesAnimted TextureLight UpdatesTick UpdatesParticlesRenders
Light Blocks1FalseFalseTrueFalseFalseFalse
Lanterns4FalseTrueTrueTrueFalseTrue
Custom Blocks2FalseFalseTrueFalseFalseTrue
Mushrooms3FalseFalseTrueTrueFalseTrue
Redstone Lamps3TrueFalseTrueFalseFalseTrue
Glowstone3TrueFalseTrueTrueFalseTrue
Sea Lanterns4FalseTrueTrueTrueFalseTrue
Torches4FalseFalseTrueTrueTrueTrue
Redstone Torches5TrueFalseTrueTrueTrueTrue

Molang ​

Recursion ​

  • Minimize use of recursion when possible
  • Intense nested loop structures will cause performance issues
  • Use break to escape loops when possible

Structs ​

  • Avoid making structs too deep, as there is a performance cost with each layer

Variables ​

  • Use temp variables when possible to minimize variables loaded in memory
  • Consider how often variables are calculated based on script type

Textures ​

texture_list.json ​

  • Tons of textures badly affect game performance. Create a texture_list.json file.

Quantity ​

  • No more than 3000 textures should be used

This is due to limits imposed by Render Dragon

Render Dragon has a 4096 texture quantity limit, and there are 800 vanilla textures as of 1.16

Resolution ​

  • The maximum texture resolution is 16384x16384
  • The recommended maximum texture resolution is 4096x4096 to maintain compatibility with low-end devices
  • Keep in mind that textures are atlased, and larger textures can mess with atlas generation on lower-end devices
  • Only make textures as significant as needed to convey the detail needed at the needed distance

Trades ​

Villager trades cause performance issues and even crashes on all devices at 60 trades or greater. Avoid tons of trades for one entity. Your best bet to resolve this issue is to split your trades in half and move them to another villager or custom entity/npc, 30 trades is a good safe number from testing. probably JSON UI issues

Sounds ​

Count ​

  • Total registered sounds are reported to have an impact on performance

Compression ​

  • Sound compression is exceptionally beneficial to pack size
  • This is especially noticeable on older and low power devices, such as the Switch
  • The FMod simple API utilized by Bedrock decompresses all sounds into WAV before loading into RAM, meaning no CPU performance improvement in this respect

If audio is streamed, this does not occur

Streaming ​

  • As general guidance, sounds over 500kb in size or 1 minute in length should be streamed

Redstone ​

Chunk Boundaries ​

  • Crossing chunk boundaries with Redstone should be avoided

Command Blocks ​

  • When creating large command blockchains, stack vertically and in a single chunk
  • Minimize command block use in favor of functions and behaviors where possible

Ticking Areas ​

  • Total chunks are of more significant concern than ticking areas
  • Dynamic areas should be avoided unless necessary
  • Best practice is to minimizing the ticking area to one chunk if possible

All always-on Redstone should fit in this ticking chunk

  • Unload ticking areas when they are no longer needed, testing via /testforblock

Files ​

  • Tons of files can badly affect game performance. Create a contents.json file.

Contributors

Edit Add-On Performance on GitHub

Bedrock Wiki by Bedrock OSS

"Minecraft" is a trademark of Mojang AB.

Bedrock OSS, Bedrock Wiki and bedrock.dev are not affiliated in any way with Microsoft or Mojang AB.

  • Privacy Policy
  • Join our Discord
  • Learn how to Contribute
  • Visit our Repository