Skip to content

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in 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