New issue
Advanced search Search tips

Issue 784026 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug

Blocking:
issue 750955



Sign in to add a comment

NetworkStateHandler is emitting change events for uninteresting BSSID and Frequency

Project Member Reported by steve...@chromium.org, Nov 11 2017

Issue description

Examining the device-log while debugging some Settings UI sluggishness, I noticed a bunch of updates for BSSID and Frequency for non active (connected or connecting) networks. These changes are not interesting to the UI and can trigger costly updates, we should suppress them.

 
Blocking: 750955
Initial CL to reduce event spam is here:
https://chromium-review.googlesource.com/c/chromium/src/+/773507

Comment 3 Deleted

Follow up CL to reduce C++ -> JS events is here:
https://chromium-review.googlesource.com/c/chromium/src/+/775661/2

Since each C++ -> JS event sends a separate message, including a copy of the list of network IDs, reducing the number of such events will have a small but non trivial impact on performance. (Firing events within the JS should just pass references to data already converted to JS so should be much cheaper).


I created a couple of diagrams to roughly document where events are handled before and after this change:


Current (M63):
https://docs.google.com/a/google.com/drawings/d/12nSfH6vIbh4CClVsETPzW7L24FEa1GWp08ufBPMMc7Y/edit?usp=sharing

New (M64):
https://docs.google.com/a/google.com/drawings/d/1bAADIfg7hDgJ4FR5G-p3TVTjFNw8I9Mcz4fX0OYuV18/edit?usp=sharing
Project Member

Comment 5 by bugdroid1@chromium.org, Nov 17 2017

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

commit a58b24fb05dd9c0ece547479c1f72422588265a5
Author: Steven Bennetts <stevenjb@chromium.org>
Date: Fri Nov 17 22:25:41 2017

Reduce NetworkStateHandler event spam

With WebUI we rely more on networkingPrivate events which are
triggered by NetworkStateHandler.

NetworkPropertiesUpdated is getting triggered more often than is
necessary. In areas with a large number of visible WiFi networks
this can generate significant extra work for the WebUI JS when
scanning (i.e. when the WiFI subpage is open).

This CL eliminates some uninteresting event notifications (most
of which were already removed from the log but were still firing
events).

Bug:  784026 
Change-Id: I7ccf7dc443d6ce59ea36cf425cec6e9a1c1f0222
Reviewed-on: https://chromium-review.googlesource.com/773507
Commit-Queue: Steven Bennetts <stevenjb@chromium.org>
Reviewed-by: Kyle Horimoto <khorimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#517589}
[modify] https://crrev.com/a58b24fb05dd9c0ece547479c1f72422588265a5/chromeos/network/network_state_handler.cc
[modify] https://crrev.com/a58b24fb05dd9c0ece547479c1f72422588265a5/chromeos/network/network_state_handler.h
[modify] https://crrev.com/a58b24fb05dd9c0ece547479c1f72422588265a5/chromeos/network/network_state_handler_unittest.cc

Project Member

Comment 6 by bugdroid1@chromium.org, Nov 18 2017

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

commit e98cabb1e246a45981387f67fa81cd53e01f2167
Author: Steven Bennetts <stevenjb@chromium.org>
Date: Sat Nov 18 00:52:55 2017

Settings > Internet: Use fewer networkingPrivate event listeners

C++ -> JS listeners are relatively expensive and having more than
one for a particular event is unnecessary, more complex, and
confusing.

Instead, make <internet-page>, which contains the other elements,
the primary listener and dispatch JS events to the other elements
when a networkingPrivate event occurs.

Bug:  784026 
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: I834797a2d814cde563144bac816c69d55ad78633
Reviewed-on: https://chromium-review.googlesource.com/775661
Commit-Queue: Steven Bennetts <stevenjb@chromium.org>
Reviewed-by: Kyle Horimoto <khorimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#517644}
[modify] https://crrev.com/e98cabb1e246a45981387f67fa81cd53e01f2167/chrome/browser/resources/settings/internet_page/internet_detail_page.js
[modify] https://crrev.com/e98cabb1e246a45981387f67fa81cd53e01f2167/chrome/browser/resources/settings/internet_page/internet_known_networks_page.js
[modify] https://crrev.com/e98cabb1e246a45981387f67fa81cd53e01f2167/chrome/browser/resources/settings/internet_page/internet_page.html
[modify] https://crrev.com/e98cabb1e246a45981387f67fa81cd53e01f2167/chrome/browser/resources/settings/internet_page/internet_page.js
[modify] https://crrev.com/e98cabb1e246a45981387f67fa81cd53e01f2167/chrome/browser/resources/settings/internet_page/internet_subpage.js
[modify] https://crrev.com/e98cabb1e246a45981387f67fa81cd53e01f2167/chrome/browser/resources/settings/internet_page/network_summary.js

Status: Fixed (was: Started)
Project Member

Comment 8 by bugdroid1@chromium.org, Dec 9 2017

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

commit be2b00c0f47c532676f7794f7618ca563d0c7506
Author: Steven Bennetts <stevenjb@chromium.org>
Date: Sat Dec 09 02:31:12 2017

NetworkState: Further reduce event spam

Bug:  784026 
Change-Id: I5a3ae2ea2d1c948179afca9f2efbf150994db755
Reviewed-on: https://chromium-review.googlesource.com/816357
Commit-Queue: Steven Bennetts <stevenjb@chromium.org>
Reviewed-by: Kyle Horimoto <khorimoto@chromium.org>
Reviewed-by: Toni Barzic <tbarzic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#522965}
[modify] https://crrev.com/be2b00c0f47c532676f7794f7618ca563d0c7506/ash/system/network/network_list.cc
[modify] https://crrev.com/be2b00c0f47c532676f7794f7618ca563d0c7506/ash/system/network/tray_network_state_observer.cc
[modify] https://crrev.com/be2b00c0f47c532676f7794f7618ca563d0c7506/ash/system/network/tray_network_state_observer.h
[modify] https://crrev.com/be2b00c0f47c532676f7794f7618ca563d0c7506/chrome/browser/chromeos/tether/tether_service.cc
[modify] https://crrev.com/be2b00c0f47c532676f7794f7618ca563d0c7506/chrome/browser/chromeos/tether/tether_service.h
[modify] https://crrev.com/be2b00c0f47c532676f7794f7618ca563d0c7506/chromeos/components/tether/wifi_hotspot_connector.cc
[modify] https://crrev.com/be2b00c0f47c532676f7794f7618ca563d0c7506/chromeos/components/tether/wifi_hotspot_connector.h
[modify] https://crrev.com/be2b00c0f47c532676f7794f7618ca563d0c7506/chromeos/dbus/shill_service_client.cc
[modify] https://crrev.com/be2b00c0f47c532676f7794f7618ca563d0c7506/chromeos/network/network_device_handler_impl.cc
[modify] https://crrev.com/be2b00c0f47c532676f7794f7618ca563d0c7506/chromeos/network/network_state.cc
[modify] https://crrev.com/be2b00c0f47c532676f7794f7618ca563d0c7506/chromeos/network/network_state_handler.cc
[modify] https://crrev.com/be2b00c0f47c532676f7794f7618ca563d0c7506/chromeos/network/network_state_handler_observer.h
[modify] https://crrev.com/be2b00c0f47c532676f7794f7618ca563d0c7506/chromeos/network/shill_property_handler.cc
[modify] https://crrev.com/be2b00c0f47c532676f7794f7618ca563d0c7506/extensions/browser/api/networking_private/networking_private_event_router_chromeos.cc

Sign in to add a comment