Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(710)

Issue 2690333003: service worker: Optimize response header creation. (Closed)

Created:
3 years, 10 months ago by falken
Modified:
3 years, 10 months ago
Reviewers:
horo, xunjieli
CC:
chromium-reviews, michaeln, jsbell+serviceworker_chromium.org, shimazu+serviceworker_chromium.org, serviceworker-reviews, jam, nhiroki, kinuko+serviceworker, horo+watch_chromium.org, darin-cc_chromium.org, kinuko+watch, tzik, blink-worker-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

service worker: Optimize response header creation. HttpResponseHeaders::AddHeader has O(n^2) performance. Avoid using it. I verified on Linux that constructing the headers from a ServiceWorkerHeaderMap of 1000 headers goes from ~500ms to <1ms. BUG=687230 Review-Url: https://codereview.chromium.org/2690333003 Cr-Commit-Position: refs/heads/master@{#450563} Committed: https://chromium.googlesource.com/chromium/src/+/cd398136c4992574a2161d68acb39c716095eedd

Patch Set 1 #

Total comments: 2

Patch Set 2 : fix auto #

Unified diffs Side-by-side diffs Delta from patch set Stats (+48 lines, -24 lines) Patch
M content/browser/service_worker/service_worker_url_request_job.cc View 1 1 chunk +13 lines, -13 lines 0 comments Download
M content/browser/service_worker/service_worker_url_request_job_unittest.cc View 6 chunks +35 lines, -11 lines 0 comments Download

Messages

Total messages: 18 (11 generated)
falken
horo: ptal
3 years, 10 months ago (2017-02-14 07:23:48 UTC) #3
falken
xunjieli: ptal
3 years, 10 months ago (2017-02-14 12:53:14 UTC) #9
xunjieli
lgtm. thanks for the fix. https://codereview.chromium.org/2690333003/diff/1/content/browser/service_worker/service_worker_url_request_job.cc File content/browser/service_worker/service_worker_url_request_job.cc (right): https://codereview.chromium.org/2690333003/diff/1/content/browser/service_worker/service_worker_url_request_job.cc#newcode684 content/browser/service_worker/service_worker_url_request_job.cc:684: for (auto it = ...
3 years, 10 months ago (2017-02-14 17:09:58 UTC) #10
horo
lgtm
3 years, 10 months ago (2017-02-14 22:25:28 UTC) #11
falken
> thanks for the fix. Thank you for pointing out the bug! https://codereview.chromium.org/2690333003/diff/1/content/browser/service_worker/service_worker_url_request_job.cc File content/browser/service_worker/service_worker_url_request_job.cc ...
3 years, 10 months ago (2017-02-15 00:39:39 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2690333003/20001
3 years, 10 months ago (2017-02-15 00:43:51 UTC) #15
commit-bot: I haz the power
3 years, 10 months ago (2017-02-15 05:38:46 UTC) #18
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/cd398136c4992574a2161d68acb3...

Powered by Google App Engine
This is Rietveld 408576698