You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found that this problem related with promiseHooks in vm-shared worker here.
Yeah, I had the intuition the issue you described would be related to this promiseHook.
If you want to dig a bit more, I would expect that the largest part of that extra time comes from these lines, which gets called from the promise hook (see the .stack, which internally calls the prepareStackTrace function).
Is it really important to handle any promise?
The goal of that hook is to capture the data we need for the __stack_trace and __enhanced_stack_trace Workflow queries, which are called from the Temporal UI to help diagnose Workflow issues. That's a nice to have feature, but definitely not required. In fact, promiseHooks is not supported on Node <16.14, in which case that hook simply doesn't get registered.
Adding a worker config option to turn off this feature would be a possibility.
I would however like to investigate first what can be done to reduce the runtime overhead of capturing stack traces on async contexts. I have a few ideas in mind that, I believe, could reduce the cost to nearly zero, without compromising on availability of this feature.
What are you really trying to do?
Hi, I have a workflow like dsl-interpreter from sample and I found that my workflow is slow.
Describe the bug
For some reason using async functions in workflows is drastically slower than sync functions. Could you help me?
I have 2 identical workflows (synthetic examples), the difference only in using async in functions:
My worker and client
And I have this results
Environment/Versions
SDK: typescript-sdk: 1.10.3
Are you using Docker or Kubernetes or building Temporal from source?
I installed temporal from brew
The text was updated successfully, but these errors were encountered: