Skip to content

Improve CDP memory usage #3711

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 2 commits into from
Apr 29, 2025
Merged

Improve CDP memory usage #3711

merged 2 commits into from
Apr 29, 2025

Conversation

mdmintz
Copy link
Member

@mdmintz mdmintz commented Apr 29, 2025

Improve CDP memory usage

If you're spinning up a lot of CDP Mode web browsers in a loop within a Python file, then you'll use less memory because resources will get freed up at the end of the with SB() as sb: block, rather than after you've reached the end of the Python file (where regular garbage collection takes place).

Related discussion: #3679 - (Special thanks @felipehertzer. Joint effort with @mdmintz)

@mdmintz mdmintz added enhancement Making things better SeleniumBase 4 SeleniumBase 4 UC Mode / CDP Mode Undetected Chromedriver Mode / CDP Mode labels Apr 29, 2025
@mdmintz mdmintz self-assigned this Apr 29, 2025
@mdmintz mdmintz merged commit bdec244 into master Apr 29, 2025
6 checks passed
@mdmintz mdmintz deleted the improve-cdp-memory-usage branch April 29, 2025 14:35
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement Making things better SeleniumBase 4 SeleniumBase 4 UC Mode / CDP Mode Undetected Chromedriver Mode / CDP Mode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant