-
Notifications
You must be signed in to change notification settings - Fork 137
Open
Description
I run a series of workers on my Temporal pod bootup. They sometimes take up over 2GB of RAM simply from parsing the source maps. I've confirmed this using clinic.js.
sdk-typescript/packages/worker/src/worker.ts
Line 1868 in 5473ebd
| const [actualCode, sourceMapJson] = extractSourceMap(code); |
I am curious if there is a way to optionally allow turning off source maps? I can do so via the builder
const { code } = await bundleWorkflowCode({
workflowsPath: worker.workflowsPath,
// Remove source maps
webpackConfigHook: config => {
config.devtool = false;
return config;
}
});
But then the extractSourceMap throws, and if I patch it I see further failures down the line in addWorkflowBundle > SourceMapConsumer
I managed to patch it (in a dirty way)
return [code, JSON.stringify({
version: 3,
file: '',
sources: [],
mappings: '',
})];
// throw new Error("Can't extract inlined source map from the provided Workflow Bundle");Which results in significantly lower bootup + IDLE ram usage
Before
After

Metadata
Metadata
Assignees
Labels
No labels