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

Issue 678397 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: May 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Feature



Sign in to add a comment

Consider replacing unordered_maps in PropertyTrees with base::flat_map

Project Member Reported by ajuma@chromium.org, Jan 4 2017

Issue description

PropertyTrees have unordered_maps mappping node owners ids to node ids for each tree type. For the typical property tree size, a sorted vector + binary search is likely a better choice. Lookups in unordered_map have already caused at least one perf regression ( issue 670074 ).
 
This thread in chromium-dev@ from a while back was interesting and may have some relevant thoughts though our case is likely simpler than what they were looking at:

https://groups.google.com/a/chromium.org/d/msg/chromium-dev/4uQMma9vj9w/HaQ-WvMOAwAJ

Comment 2 by ajuma@chromium.org, Apr 18 2017

Cc: ajuma@chromium.org
Owner: jaydasika@chromium.org
Summary: Consider replacing unordered_maps in PropertyTrees with base::flat_map (was: Consider replacing unordered_maps in PropertyTrees with sorted vectors)
Project Member

Comment 3 by bugdroid1@chromium.org, May 1 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/dfcb08fa366cfdc45f3a18e5e421a34aa038af0b

commit dfcb08fa366cfdc45f3a18e5e421a34aa038af0b
Author: jaydasika <jaydasika@chromium.org>
Date: Mon May 01 20:58:27 2017

cc : Replace unordered_maps with flat_map in property trees

Because these maps should be small.

BUG= 678397 
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel

Review-Url: https://codereview.chromium.org/2848243003
Cr-Commit-Position: refs/heads/master@{#468403}

[modify] https://crrev.com/dfcb08fa366cfdc45f3a18e5e421a34aa038af0b/cc/trees/property_tree.cc
[modify] https://crrev.com/dfcb08fa366cfdc45f3a18e5e421a34aa038af0b/cc/trees/property_tree.h

Status: Fixed (was: Assigned)

Sign in to add a comment