Skip to content
This repository was archived by the owner on Apr 7, 2024. It is now read-only.

ResizeObserver loop limit exceeded #150

Open
LeeeeeeM opened this issue Mar 15, 2021 · 4 comments
Open

ResizeObserver loop limit exceeded #150

LeeeeeeM opened this issue Mar 15, 2021 · 4 comments

Comments

@LeeeeeeM
Copy link

这个异常已经在很多版本抛出了,虽然不影响功能,但是在控制台中展示还是不妥。希望官方修复下。

@feichao93
Copy link
Collaborator

好的,我粗看了下可能和性能有关,具体我再调研一下

@LeeeeeeM
Copy link
Author

好的,我粗看了下可能和性能有关,具体我再调研一下

相关资料 https://stackoverflow.com/questions/49384120/resizeobserver-loop-limit-exceeded WICG/resize-observer#38 需要在raf一帧结束后中修改做callback

@LeeeeeeM
Copy link
Author

https://github.com/w3c/csswg-drafts/blob/main/resize-observer-1/explainer.md 这里描述了整个ResizeObserver的渲染过程。 https://www.w3.org/TR/resize-observer-1/#gather-active-observations-at-depth 规范里面写到,如果node depth大于 传入depth就会抛错,防止循环处理。 拥有大数据量的表格在初始化和横向滚动时会出现这个异常。我怀疑滚动时上一次的layout没有完成后续一帧进行了depth处理。

@inoryFly
Copy link

好的,我粗看了下可能和性能有关,具体我再调研一下

问一下,有什么好的解决办法嘛?我们这边也遇到了

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants