Open
Bug 1433362
Opened 8 years ago
Updated 4 years ago
Avoid removing each observers for nsRefreshDriver when we destroy the root document
Categories
(Core :: Layout, enhancement, P3)
Core
Layout
Tracking
()
NEW
People
(Reporter: hiro, Unassigned)
Details
As Brian noted in bug 1415780 comment 47, when we destroy a document, we call RemoveStyleFlushObserver() [1] and also other observers for nsRefreshDriver. In the case we destroy the root document, it will end up O(N^2) cost there. We should avoid it somehow.
[1] https://hg.mozilla.org/mozilla-central/file/723b25eb3dd8/layout/base/nsRefreshDriver.h#l183
| Reporter | ||
Comment 1•8 years ago
|
||
FWIW, I did push a try with removing all observers in descendants;
https://treeherder.mozilla.org/#/jobs?repo=try&revision=50f87640b253417951deed58a699d63fb18f39eb
Is seems there are some test cases that we shouldn't remove descendant observers for reflows?
https://treeherder.mozilla.org/#/jobs?repo=try&revision=50f87640b253417951deed58a699d63fb18f39eb&selectedJob=158656966
Updated•4 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•