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

Issue 830040 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
please use my google.com address
Closed: Apr 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocked on:
issue 830117

Blocking:
issue 831261



Sign in to add a comment

Mojo maps should use flat_map

Project Member Reported by roc...@chromium.org, Apr 6 2018

Issue description

They use unordered_map now which is bad.

Rationale:
 - most IPC maps are small
 - most IPC maps *should* be small
 - flat_map is great for small maps
 - unordered_map is pretty much always the worst possible choice

Prioritizing this because it's blocking some other interface cleanup work.
 
Blockedon: 830117
Blocking: 831261
Project Member

Comment 3 by bugdroid1@chromium.org, Apr 24 2018

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

commit 089427359d5299c26cfb7433f1b85793a361ece9
Author: Ken Rockot <rockot@chromium.org>
Date: Tue Apr 24 14:51:37 2018

Mojo C++ Bindings: unordered_map => flat_map

Switches mojom maps to use base::flat_map for C++ bindings instead of
std::unordered_map.

Bug:  830040 
Change-Id: Ifcc4ed6a4a76745940aaa5fb75afc61eae243763
Reviewed-on: https://chromium-review.googlesource.com/1000393
Commit-Queue: Ken Rockot <rockot@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Jay Civelli <jcivelli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#553102}
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/ash/accelerators/accelerator_controller_registrar.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/ash/accelerators/accelerator_controller_registrar.h
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/ash/accelerators/accelerator_handler.h
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/ash/app_list/app_list_controller_impl.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/ash/window_manager.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/ash/window_manager.h
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/chrome/browser/chromeos/arc/accessibility/arc_accessibility_helper_bridge_unittest.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/chrome/browser/chromeos/arc/accessibility/ax_tree_source_arc_unittest.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/chrome/browser/chromeos/login/lock/screen_locker.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/chrome/browser/chromeos/login/lock/screen_locker.h
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/chrome/browser/ui/app_list/app_list_model_updater.h
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/chrome/browser/ui/app_list/chrome_app_list_model_updater.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/chrome/browser/ui/app_list/search/app_search_provider.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/chrome/browser/ui/app_list/search/app_search_provider.h
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/chrome/browser/ui/app_list/test/fake_app_list_model_updater.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/chrome/browser/ui/app_list/test/fake_app_list_model_updater.h
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/chrome/browser/ui/webui/settings/chromeos/fingerprint_handler.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/chrome/browser/ui/webui/settings/chromeos/fingerprint_handler.h
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/components/printing/service/public/cpp/pdf_service_mojo_types.h
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/components/services/heap_profiling/connection_manager.h
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/content/browser/renderer_host/clipboard_host_impl.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/content/browser/renderer_host/clipboard_host_impl.h
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/content/browser/service_worker/service_worker_installed_script_loader.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/content/browser/service_worker/service_worker_installed_script_loader.h
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/content/browser/service_worker/service_worker_installed_script_reader.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/content/browser/service_worker/service_worker_installed_script_reader.h
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/content/browser/service_worker/service_worker_installed_scripts_sender.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/content/browser/service_worker/service_worker_installed_scripts_sender.h
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/content/renderer/indexed_db/indexed_db_database_callbacks_impl.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/content/renderer/mus/mus_embedded_frame.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/content/renderer/mus/renderer_window_tree_client.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/content/renderer/mus/renderer_window_tree_client.h
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/extensions/browser/api/mime_handler_private/mime_handler_private.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/mojo/public/cpp/bindings/BUILD.gn
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/mojo/public/cpp/bindings/clone_traits.h
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/mojo/public/cpp/bindings/equals_traits.h
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/mojo/public/cpp/bindings/lib/serialization.h
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/mojo/public/cpp/bindings/map.h
[add] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/mojo/public/cpp/bindings/map_traits_flat_map.h
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/mojo/public/cpp/bindings/struct_ptr.h
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/mojo/public/cpp/bindings/struct_traits.h
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/mojo/public/cpp/bindings/tests/map_unittest.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/mojo/public/cpp/bindings/tests/union_unittest.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/mojo/public/cpp/bindings/tests/wtf_types_unittest.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/mojo/public/tools/bindings/generators/cpp_templates/module-shared.h.tmpl
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/mojo/public/tools/bindings/generators/mojom_cpp_generator.py
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/mojo/public/tools/fuzzers/mojo_fuzzer_message_dump.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/services/device/fingerprint/fingerprint_chromeos.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/services/device/fingerprint/fingerprint_chromeos.h
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/services/device/fingerprint/fingerprint_chromeos_unittest.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/services/preferences/pref_store_manager_impl.h
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/services/preferences/public/cpp/pref_service_factory.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/services/preferences/scoped_pref_connection_builder.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/services/preferences/scoped_pref_connection_builder.h
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/services/resource_coordinator/memory_instrumentation/coordinator_impl.h
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/services/resource_coordinator/memory_instrumentation/coordinator_impl_unittest.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/services/resource_coordinator/memory_instrumentation/queued_request.h
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/services/resource_coordinator/memory_instrumentation/queued_request_dispatcher.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/services/resource_coordinator/memory_instrumentation/queued_request_dispatcher.h
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/services/resource_coordinator/public/cpp/memory_instrumentation/client_process_impl.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/services/ui/clipboard/clipboard_impl.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/services/ui/clipboard/clipboard_impl.h
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/services/ui/clipboard/clipboard_unittest.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/services/ui/demo/mus_demo_internal.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/services/ui/demo/mus_demo_internal.h
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/services/ui/test_ws/test_ws.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/services/ui/ws/async_event_dispatcher.h
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/services/ui/ws/drag_controller.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/services/ui/ws/drag_controller.h
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/services/ui/ws/drag_controller_unittest.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/services/ui/ws/drag_target_connection.h
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/services/ui/ws/event_dispatcher_impl.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/services/ui/ws/event_dispatcher_impl.h
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/services/ui/ws/event_processor.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/services/ui/ws/event_processor.h
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/services/ui/ws/test_change_tracker.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/services/ui/ws/test_change_tracker.h
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/services/ui/ws/test_utils.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/services/ui/ws/test_utils.h
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/services/ui/ws/window_manager_state.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/services/ui/ws/window_manager_state.h
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/services/ui/ws/window_manager_state_unittest.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/services/ui/ws/window_server_test_base.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/services/ui/ws/window_server_test_base.h
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/services/ui/ws/window_tree.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/services/ui/ws/window_tree.h
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/services/ui/ws/window_tree_client_unittest.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/services/ui/ws/window_tree_unittest.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/services/ui/ws2/test_change_tracker.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/services/ui/ws2/test_change_tracker.h
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/services/ui/ws2/test_window_service_delegate.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/services/ui/ws2/test_window_service_delegate.h
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/services/ui/ws2/test_window_tree_client.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/services/ui/ws2/test_window_tree_client.h
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/services/ui/ws2/window_service_client.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/services/ui/ws2/window_service_client.h
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/services/ui/ws2/window_service_client_test_helper.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/services/ui/ws2/window_service_delegate.h
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/services/ui/ws2/window_tree_client_unittest.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/ui/aura/mus/drag_drop_controller_mus.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/ui/aura/mus/window_manager_delegate.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/ui/aura/mus/window_manager_delegate.h
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/ui/aura/mus/window_tree_client.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/ui/aura/mus/window_tree_client.h
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/ui/aura/mus/window_tree_client_unittest.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/ui/aura/test/aura_test_base.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/ui/aura/test/aura_test_base.h
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/ui/aura/test/mus/test_window_manager_client.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/ui/aura/test/mus/test_window_manager_client.h
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/ui/aura/test/mus/test_window_manager_delegate.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/ui/aura/test/mus/test_window_manager_delegate.h
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/ui/aura/test/mus/test_window_tree.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/ui/aura/test/mus/test_window_tree.h
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/ui/base/clipboard/custom_data_helper.cc
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/ui/base/clipboard/custom_data_helper.h
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/ui/events/event.h
[modify] https://crrev.com/089427359d5299c26cfb7433f1b85793a361ece9/ui/views/mus/clipboard_mus.h

Comment 4 by roc...@chromium.org, Apr 24 2018

Status: Fixed (was: Assigned)

Sign in to add a comment