Skip to content

fix(playwright): dispose of APIResponse body for send_request#1771

Open
kozlice wants to merge 2 commits intoapify:masterfrom
kozlice:pw-apiresponse-dispose
Open

fix(playwright): dispose of APIResponse body for send_request#1771
kozlice wants to merge 2 commits intoapify:masterfrom
kozlice:pw-apiresponse-dispose

Conversation

@kozlice
Copy link

@kozlice kozlice commented Mar 1, 2026

Description

Dispose of Playwright's APIResponse body, otherwise it stays in memory until the context closes.

If not done, this can lead to excessive memory usage during crawling when using send_request within a handler.

Issues

...

Testing

send_request is already covered by tests, so if they pass I think it should be OK.

Checklist

  • CI passed

Dispose of Playwright's APIResponse body, otherwise it stays in memory until the context closes.

If not done, this can lead to excessive memory usage during crawling when using `send_request` within a handler.
@kozlice kozlice changed the title fix(playwright): dispose of APIResponse body fix(playwright): dispose of APIResponse body for send_request Mar 1, 2026
Copy link
Collaborator

@vdusek vdusek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks good, I have just one nit.

@vdusek vdusek requested a review from Mantisus March 2, 2026 09:01
@vdusek
Copy link
Collaborator

vdusek commented Mar 2, 2026

@Mantisus Could you please check this as well?

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.

2 participants