Execution time out while loading samples
-
I have a loop that loads my sample maps into samplers. When I'm loading a big patch with a lot of samples I'm getting a timeout in this loop. @Christoph-Hart Are the samples loading on the same thread that the script is running? I thought they were on a separate thread.
-
@d-healey Yes they are but they are synchronised so the scripting thread waits until the sample loading thread has completed its job.
There are a bunch of ways to solve this problem, either by raising the global compile timeout on your local machine or by adding a
Engine.extendTimeout()
call in your loop.https://docs.hise.audio/scripting/scripting-api/engine/index.html#extendtimeout
-
@Christoph-Hart Ah thanks, I'll look into that. I should mention that the samples are currently not compressed to monoliths. Will that make a difference do you think?
-
@Christoph-Hart said in Execution time out while loading samples:
Engine.extendTimeout()
Hmm the docs say this has no effect in a compiled plugin, but my problem is triggered when changing presets (which triggers the loading of sample maps) at this point the scripts are already compiled.
Can I use a background task for this to avoid the issue?
-
@d-healey said in Execution time out while loading samples:
Hmm the docs say this has no effect in a compiled plugin,
There is no timeout in a compiled plugin, AFAIK it's a safety mechanism built only into the HISE IDE (just like breakpoints & stack traces).
But yes, a background thread would be the better tool for the job.