TurboWarp / scratch-vm

Scratch VM with a JIT compiler and more features
https://turbowarp.org/
Mozilla Public License 2.0
75 stars 72 forks source link

Broadcasts get compiled dynamically #166

Closed softedco closed 1 year ago

softedco commented 1 year ago

Expected Behavior

Broadcasts should get compiled once after you click the green flag and the code doesn't change until you click the green flag again

Actual Behavior

Changes in the code reflect on what's happening on the scene regardless of what the Disable compiler setting says

Steps to Reproduce

image

Operating System and Browser

N/A

CST1229 commented 1 year ago

Can't replicate, make sure you don't have the "Disable compiler in editor" addon on. image

softedco commented 1 year ago

I don't have it

softedco commented 1 year ago

oh wait wrong image image it should be this

CST1229 commented 1 year ago

oh wait wrong image image it should be this

Scripts are recompiled the next time they're run when they're modified, this is normal. (It happens with custom blocks, too.)

softedco commented 1 year ago

oh wait wrong image image it should be this

Scripts are recompiled the next time they're run when they're modified, this is normal. (It happens with custom blocks, too.)

it doesn't happen with custom blocks, it happens exclusively to event hat blocks including broadcasts which can't start projects by themselves, that's why I think they should be compiled only once because otherwise they ruin performance

CST1229 commented 1 year ago

it doesn't happen with custom blocks, it happens exclusively to event hat blocks including broadcasts which can't start projects by themselves, that's why I think they should be compiled only once because otherwise they ruin performance

They probably only get recompiled when they are modified (also yea custom blocks aren't counted as separate scripts, i probably got confused because i only really found it with custom blocks in broadcasts.).

softedco commented 1 year ago

it doesn't happen with custom blocks, it happens exclusively to event hat blocks including broadcasts which can't start projects by themselves, that's why I think they should be compiled only once because otherwise they ruin performance

They probably only get recompiled when they are modified (also yea custom blocks aren't counted as separate scripts, i probably got confused because i only really found it with custom blocks in broadcasts.).

they get recompiled each run because they are treated as event hat blocks and event hat blocks usually can start projects by themselves which broadcasts can't do

GarboMuffin commented 1 year ago

works as intended