#503·snapdom

Optimize lag issues when there is a large number of DOM nodes

Author: syuanesriCreated Sep 16, 2026Updated Sep 20, 2026
Labelsenhancement✅ solved

Is your feature request related to a problem? Please describe.

When there is a large number of DOM elements to capture, page lag will occur. Can we optimize the screenshot algorithm, similar to React Fiber? Split the traversal of the huge DOM tree into multiple segments, yield the main thread, and avoid synchronous recursion that runs for hundreds of milliseconds at a time.

This snapdom.html document can be used for reproduction

screenshot latency is acceptable when there is a large number of DOM elements, but page stuttering should ideally be avoided.

https://github.com/user-attachments/assets/e6aaa796-786e-4dc3-b6a9-c5e6d8466882