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 { ...@@ -230,24 +230,19 @@ export class TraceEntryPointsPlugin implements webpack.Plugin {
// ) // )
// continue // continue
// } // }
const collectDependencies = (mod: any, span: Span) => { const collectDependencies = (mod: any) => {
const childSpan = span.traceChild('collect-dependencies', { if (!mod || !mod.dependencies) return
resource: mod.resource,
})
return childSpan.traceFn(() => {
if (!mod || !mod.dependencies) return
for (const dep of mod.dependencies) { for (const dep of mod.dependencies) {
const depMod = getModuleFromDependency(compilation, dep) const depMod = getModuleFromDependency(compilation, dep)
if (depMod?.resource && !depModMap.get(depMod.resource)) { if (depMod?.resource && !depModMap.get(depMod.resource)) {
depModMap.set(depMod.resource, depMod) depModMap.set(depMod.resource, depMod)
collectDependencies(depMod, childSpan) collectDependencies(depMod)
}
} }
}) }
} }
collectDependencies(entryMod, entrySpan) collectDependencies(entryMod)
const toTrace: string[] = [entry, ...depModMap.keys()] 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