Skip to content

perf(memory): drop async parents of request initiators in NetworkCollector - #3345

Open
thomasbachem wants to merge 1 commit into
ChromeDevTools:mainfrom
thomasbachem:fix/network-initiator-stack
Open

thomasbachem wants to merge 1 commit into
ChromeDevTools:mainfrom
thomasbachem:fix/network-initiator-stack

Conversation

@thomasbachem

Copy link
Copy Markdown
Contributor

This drops initiator.stack.parent from every request NetworkCollector keeps. The async parents get there through the debugger createTargetUniverse() starts (see #3344), and no tool reads them.

With the repro from #3344, the heap now levels off at 52 MB instead of 290 MB on main. On a Google Calendar tab, an initiator averaged 416 KB, of which 11 KB remain without the async parents.

No tool output changes, and console messages and errors still show their async fragments. I edit the object initiator() returns rather than a copy, since a copy wouldn't free anything. That relies on Puppeteer handing out its own object, which the mocked test can't check.

Fixes #3344

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Collected network requests keep deep async initiator stacks

1 participant