From d1c230cabb051a5429242c98e67d37b65edc58b8 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Fri, 8 Apr 2016 07:55:13 +0100 Subject: Do not post hint descriptors back to the frame itself. When distributing hint descriptors, do not post a frame's own hint descriptors back to the frame itself. It already has them. With regard to the message-passing cost only, this represents a speedup of approximately 3/2 for link-busy sites like reddit -- several tens of milliseconds for me. There are other costs too (such as processing the hint descriptors) bu these are not affected. --- tests/dom_tests/dom_tests.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/dom_tests/dom_tests.coffee b/tests/dom_tests/dom_tests.coffee index 3977d046..76c09f13 100644 --- a/tests/dom_tests/dom_tests.coffee +++ b/tests/dom_tests/dom_tests.coffee @@ -64,7 +64,9 @@ getHintMarkers = -> stubSettings = (key, value) -> stub Settings.cache, key, JSON.stringify value HintCoordinator.sendMessage = (name, request = {}) -> HintCoordinator[name]? request; request -activateLinkHintsMode = -> HintCoordinator.activateMode HintCoordinator.getHintDescriptors {modeIndex: 0} +activateLinkHintsMode = -> + HintCoordinator.getHintDescriptors modeIndex: 0 + HintCoordinator.activateMode hintDescriptors: {}, modeIndex: 0, originatingFrameId: frameId, # # Generate tests that are common to both default and filtered -- cgit v1.2.3