diff options
author | sque <sque@chromium.org> | 2016-03-24 08:54:10 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-24 15:55:05 +0000 |
commit | adc00de0d546fe808b01f2d7e1984e6a52c9e3a4 (patch) | |
tree | 84658b79883923d072ede282904400f5ff34b041 /net/server | |
parent | 0f90ad8a2751b55f1193112652705d21bbb2a8d0 (diff) | |
download | chromium_src-adc00de0d546fe808b01f2d7e1984e6a52c9e3a4.zip chromium_src-adc00de0d546fe808b01f2d7e1984e6a52c9e3a4.tar.gz chromium_src-adc00de0d546fe808b01f2d7e1984e6a52c9e3a4.tar.bz2 |
metrics: Replace RankedList with RankedSet
Replace the O(n) access of std::list with O(log n) of std::set.
The overall overhead of RankedList is low, as it is only called periodically
from LeakDetectorImpl::TestForLeaks(). However, it has a high overhead
relative to TestForLeaks(). Using a set instead of a list will reduce overhead
during those moments with TestForLeaks() is called.
CPU overhead across entire renderer process, with sampling rate of 1/64:
TestForLeaks RankedSet/List
============ ==============
Using RankedList 0.0107% 0.0501%
Using RankedSet 0.0149% 0.0099%
The overhead of RankedList is 5x that of TestForLeaks(), while RankedSet has
an overhead less than that of TestForLeaks().
BUG=chromium:382705
TEST=components_unittests pass
Review URL: https://codereview.chromium.org/1826023002
Cr-Commit-Position: refs/heads/master@{#383067}
Diffstat (limited to 'net/server')
0 files changed, 0 insertions, 0 deletions