onlook-dev / onlook

The open source, local-first Webflow alternative. Design directly in your live React site and publish your changes to code.
https://onlook.dev
Apache License 2.0
2.58k stars 124 forks source link

[Bug] Performance degrades for large DOM trees #135

Closed Kitenite closed 21 hours ago

Kitenite commented 1 month ago

Describe the bug

There's a lot of DOM processing happening which makes editing slow for large,nested DOM trees.

Try with example: https://www.google.com/search?sca_esv=f34a7ccbd9a4492c&sca_upv=1&q=sport+climbing+combined+olympics&oi=ddle&ct=348045702&hl=en&sa=X&ved=0ahUKEwi4_Pys7OWHAxWqFlkFHVwPFvQQPQgC&biw=1362&bih=823&dpr=1

Kitenite commented 3 weeks ago

This is isolated down to the user of getDeepElement and how when using with deep nested DOM it can have a large performance hit