Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mark WeakLinkNode sequence checking expensive
This makes for-each-node sequence checking expensive (which seems redundant). As a compromise we do non-"expensive" sequence checking in ObserverList::begin(), which should provide the same level of protection unless iterators are passed between sequences, which would be one heck of a thing to try to do. This accounts for about 60% of sequence checking in a profile I did way back. I have not profiled to see how much sequence checking remains with the sequence checking moved to begin() nor do I know the average ObserverList size. Let's try it out. In the same profile (though I don't remember what I profiled) sequence checking accounted for 1.2% of cycles. Hopefully this explains some of the performance gap between a DCHECK and regular Canary build. Bug: 40241607 Change-Id: Id80d3363771e05e6f38c1432ae66b4c352acf8b8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5319909 Reviewed-by: François Degros <fdegros@chromium.org> Commit-Queue: Peter Boström <pbos@chromium.org> Reviewed-by: danakj <danakj@chromium.org> Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org> Reviewed-by: Colin Blundell <blundell@chromium.org> Cr-Commit-Position: refs/heads/main@{#1277148}
- Loading branch information
Showing
9 changed files
with
38 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters