Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Issue 29995566: Noissue - Avoid loop if DevTools is closed (Closed)

Created:
Feb. 2, 2019, 4:14 a.m. by Manish Jethani
Modified:
Feb. 2, 2019, 8:39 a.m.
Reviewers:
Sebastian Noack
Base URL:
https://hg.adblockplus.org/adblockpluschrome/
Visibility:
Public.

Description

When DevTools is closed, the hit logger has no listeners. If we check this up front, we avoid the loop. This would be especially helpful in the case of requests from service workers.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -2 lines) Patch
M lib/hitLogger.js View 1 chunk +5 lines, -2 lines 0 comments Download

Messages

Total messages: 4
Manish Jethani
Feb. 2, 2019, 4:14 a.m. (2019-02-02 04:14:57 UTC) #1
Manish Jethani
Patch Set 1 See description.
Feb. 2, 2019, 4:17 a.m. (2019-02-02 04:17:11 UTC) #2
Sebastian Noack
Is this optimization purely theoretical, or could you measure any difference in performance? Note that ...
Feb. 2, 2019, 5:13 a.m. (2019-02-02 05:13:59 UTC) #3
Manish Jethani
Feb. 2, 2019, 8:39 a.m. (2019-02-02 08:39:27 UTC) #4
On 2019/02/02 05:13:59, Sebastian Noack wrote:
> Is this optimization purely theoretical, or could you measure any difference
in
> performance?
> 
> Note that almost always there is only a single tabId (except for the
> ServiceWorker scenario, and even then only if the user opened another tab
> loading the same website controlled by a ServiceWorker, and even if that may
> occasionally happen, it unlikely will be a lot of tabs).

OK, I checked. It does help, but only very negligibly (you can only tell if you
look at the profiler data). I don't think it's worth it, I'll close this.

Powered by Google App Engine
This is Rietveld