Hi,
Just to clarify, you're writing something like this:
Blockly.mainWorkspace.addChangeListener(e => {
if (e.type === Blockly.Events.FINISHED_LOADING) {
// Code to perform action
}
});
And the function that adds the change listener only gets called once? If so, I'm surprised that a simple function call and check like this, even if repeated thousands of time, would cause any noticeable performance degradation.
However, if this is really the case, a potential but fragile workaround based on the current implementation would be writing the following immediately after the call to
Blockly.serialization.workspaces.load :
setTimeout(() => {
// Code to perform action
}, 0);
setTimeout(functionA, 0);
setTimeout(functionB, 0);
Best,
Jason