New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 609609 link

Starred by 2 users

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug
cwp



Sign in to add a comment

Use hash map for Births -> DeathData map in base/tracked_objects.h

Project Member Reported by chongjiang@chromium.org, May 5 2016

Issue description

CWP data (internal) shows that a lot of cycles are spent calling find() on the std::map DeathMap. Use a base::hash_map for faster access. This is very similar to https://bugs.chromium.org/p/chromium/issues/detail?id=463700.
 
What platform is your data collected on? Will hash map be faster on android?
(also std::unordered_map, not base::hash_map)

Comment 3 by sque@chromium.org, May 5 2016

It's collected from x86_64 Chromebooks. Just like for the change I made last time, we can also collect some data from ARM Chromebooks if you're concerned about performance on ARM.
Ah I see on the previous bug, thanks! Collecting some data would be nice, but if the situation is the same (similar numbers of things in the map, # of queries, etc) then we can just go for it.
I ran a comparison similar to the one referenced in https://bugs.chromium.org/p/chromium/issues/detail?id=463700.

Namely, I logged in as guest and opened a new tab with cnn.com, waited ~30 seconds, then took a 5-minute profile of the whole system.

My results can be found here:
https://docs.google.com/a/google.com/spreadsheets/d/1ZOF5FZJMTXzNOD--g62FMAuSR2KNqWxnbSP_WjBeLcw/edit?usp=sharing

The results show a slight decrease in CPU usage when using unordered_map.

Sign in to add a comment