Potentially replace DefaultCompiler #573
Labels
evaluation needed
proposal needs to be validated or tested before fully implementing it in k6
performance
refactor
This commit added dumb mutex-based synchronization the
Compiler
'sTransform()
method. That was necessary because the shared globalDefaultCompiler
instance was not thread safe.We should benchmark this, but it would probably be better if instead of synchronizing a single compiler instance, we parse the babel JS source once (e.g. in an
init()
function), cache the result, removeDefaultCompiler
and create new independent compiler instances wherever we want to use them.The text was updated successfully, but these errors were encountered: