Skip to content

Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.

remove gc collect (slow)

Gregor Žunič0c854c7ce843
diff --git a/browser_use/dom/service.py b/browser_use/dom/service.py
index 0510d9d98..51869bccf 100644
--- a/browser_use/dom/service.py
+++ b/browser_use/dom/service.py
@@ -153,8 +153,6 @@ class DomService:
del js_node_map
del js_root_id
- gc.collect()
-
if html_to_dict is None or not isinstance(html_to_dict, DOMElementNode):
raise ValueError('Failed to parse HTML to dictionary')