Closed G4Vi closed 6 months ago
I believe I have a fix here: https://github.com/extism/extism/pull/627 just need to do a little more testing tomorrow.
The fix is a huge improvement! It fixes all "too slow" calls in my miniaudio integration except for the first call. I'm able to fix that by inserting a call a decoder_extism_nop
after my call that passes a lot of input.
I'll look closer at this tomorrow.
Awesome! One thing I was considering was adding a extism_plugin_reset
function to the SDK so users can control when that reset happens. It could be used instead of the call to decoder_extism_nop
but that's only necessary if I can't find any additional improvements.
Fixed in https://github.com/extism/extism/pull/627 (for posterity!)
I have a plugin built with the c-pdk, that has one function that does nothing:
and a host program using the cpp-sdk:
As you can see
bench_extism_call
andmain
both call the same plugin function,decoder_extism_nop
.bench_extism_call
doesn't pass any input data to the plugin function. Before passing the large input,decoder_extism_nop
is pretty fast:after passing the large input, it takes tens of milliseconds: