Unverified Commit 90a3b50c authored by Tim Neutkens's avatar Tim Neutkens Committed by GitHub

Remove collect-dependencies span as it balloons trace size (#29266)

Co-authored-by: 's avatarkodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
parent 800b2bee
......@@ -230,24 +230,19 @@ export class TraceEntryPointsPlugin implements webpack.Plugin {
// )
// continue
// }
const collectDependencies = (mod: any, span: Span) => {
const childSpan = span.traceChild('collect-dependencies', {
resource: mod.resource,
})
return childSpan.traceFn(() => {
if (!mod || !mod.dependencies) return
const collectDependencies = (mod: any) => {
if (!mod || !mod.dependencies) return
for (const dep of mod.dependencies) {
const depMod = getModuleFromDependency(compilation, dep)
for (const dep of mod.dependencies) {
const depMod = getModuleFromDependency(compilation, dep)
if (depMod?.resource && !depModMap.get(depMod.resource)) {
depModMap.set(depMod.resource, depMod)
collectDependencies(depMod, childSpan)
}
if (depMod?.resource && !depModMap.get(depMod.resource)) {
depModMap.set(depMod.resource, depMod)
collectDependencies(depMod)
}
})
}
}
collectDependencies(entryMod, entrySpan)
collectDependencies(entryMod)
const toTrace: string[] = [entry, ...depModMap.keys()]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment