Uploaded image for project: 'Minecraft (Bedrock codebase)'
  1. Minecraft (Bedrock codebase)
  2. MCPE-46533

Molang scripting component performance issue

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • None
    • 1.13.0.9 Beta, 1.12.0.9 Beta, 1.12.0.4 Beta
    • Confirmed
    • Windows
    • 216254

      There is a very noticeable performance degradation when accessing the MoLang scripting component in client scripts, which results in large frame drops.

      I am attaching an example behaviour pack, and steps to reproduce this error (which do involve editing the client script, to present the impact this issue has and the small changes to cause this).

      Some comparisons of frame rates before and after accessing this component:

      1. 50 fps to 8 fps. On updating said component, 6 fps.
      2. 40 fps to 5 fps. On updating, 3 fps. (Thanks to mrflippy#4110 in the Scripting Discord)
      3. 60 fps to 37 fps. On updating, 6 fps. (Thanks to Cold Fusion#0890 in the Scripting Discord)

      Steps to reproduce:

      1. Install the behaviour pack attached into the development behaviour pack folder.
      2. Create a new creative mode flat world with no other entities (normal difficulty, no mob spawning, no mob loot, experimental gameplay, behaviour pack)
      3. Load up the world.
      4. Place down any block. (Notice that there is a line of creepers on top of the block.)
      5. Note the initial fps.
      6. Leave the world.
      7. Edit the client script in the behaviour, and uncomment the lines indicated in the script itself for the second run (i.e. remove the // before it)
      8. Load the world.
      9. Run /kill @e[type=creeper] 
      10. Place down any block.
      11. Note down the FPS.
      12. Repeat steps 6-11 for the third run.

      The first run was a baseline for the next runs. In the second run, simply adding a line to get the MoLang component off the ten creepers in the world caused a large frame drop, and then proceeding to update the component caused another in the third run. 

       

      As a side note, this error is currently only present on the Windows version of the game. Upon running the Android version (which is not available by default, but is accessible by other means) this entire performance impact is gone, and increasing the amount of creepers to double or even triple still causes no problems.

            destruc7i0n destruc7i0n
            Votes:
            6 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: