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

Issue 2817043: Reduce the copying of string data between C++ and javascript in proxy_resolver_v8.cc. (Closed)

Created:
10 years, 5 months ago by eroman
Modified:
9 years, 6 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Optimization: reduce the copying of string data between C++ and javascript in proxy_resolver_v8.cc. This is done by sharing the string storage using ExternalStringResource. An accompanying change was to pass around the PAC script data as a UTF16 string16 rather than a UTF8 std::string -- this required changing plumbing in the other files. This optimization will be important when creating multiple ProxyResolverV8's so they don't end up duplicating the script text. BUG=11079 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=51434

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 8

Patch Set 4 : Address comments #

Patch Set 5 : Add thresholds #

Patch Set 6 : fix comment typo 'converts' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+304 lines, -198 lines) Patch
M net/http/http_network_transaction_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M net/proxy/init_proxy_resolver.h View 1 chunk +1 line, -1 line 0 comments Download
M net/proxy/init_proxy_resolver.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M net/proxy/init_proxy_resolver_unittest.cc View 14 chunks +26 lines, -24 lines 0 comments Download
M net/proxy/mock_proxy_resolver.h View 3 chunks +6 lines, -6 lines 0 comments Download
M net/proxy/proxy_resolver.h View 3 chunks +6 lines, -7 lines 0 comments Download
M net/proxy/proxy_resolver_mac.h View 1 chunk +1 line, -1 line 0 comments Download
M net/proxy/proxy_resolver_perftest.cc View 2 3 2 chunks +2 lines, -1 line 0 comments Download
M net/proxy/proxy_resolver_v8.h View 2 chunks +1 line, -3 lines 0 comments Download
M net/proxy/proxy_resolver_v8.cc View 1 2 3 4 5 14 chunks +124 lines, -29 lines 0 comments Download
M net/proxy/proxy_resolver_v8_unittest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M net/proxy/proxy_resolver_winhttp.h View 1 chunk +1 line, -1 line 0 comments Download
M net/proxy/proxy_resolver_winhttp.cc View 1 chunk +1 line, -1 line 0 comments Download
M net/proxy/proxy_script_fetcher.h View 1 4 chunks +7 lines, -8 lines 0 comments Download
M net/proxy/proxy_script_fetcher.cc View 1 12 chunks +31 lines, -27 lines 0 comments Download
M net/proxy/proxy_script_fetcher_unittest.cc View 12 chunks +48 lines, -48 lines 0 comments Download
M net/proxy/proxy_service.cc View 1 chunk +1 line, -1 line 0 comments Download
M net/proxy/proxy_service_unittest.cc View 11 chunks +24 lines, -19 lines 0 comments Download
net/proxy/single_threaded_proxy_resolver.h View 1 chunk +1 line, -1 line 0 comments Download
M net/proxy/single_threaded_proxy_resolver.cc View 4 chunks +6 lines, -6 lines 0 comments Download
M net/proxy/single_threaded_proxy_resolver_unittest.cc View 1 2 3 7 chunks +11 lines, -8 lines 0 comments Download
M net/proxy/sync_host_resolver_bridge_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 5 (0 generated)
eroman
iposva: Can you please review the single file: net/proxy/proxy_resolver_v8.cc (http://codereview.chromium.org/2817043/diff/17003/25010) willchan: Can you please review ...
10 years, 5 months ago (2010-06-30 02:37:28 UTC) #1
willchan no longer on Chromium
LGTM http://codereview.chromium.org/2817043/diff/17003/25009 File net/proxy/proxy_resolver_perftest.cc (right): http://codereview.chromium.org/2817043/diff/17003/25009#newcode169 net/proxy/proxy_resolver_perftest.cc:169: int rv = resolver_->SetPacScriptByData(ASCIIToUTF16(file_contents), NULL); i think you ...
10 years, 5 months ago (2010-07-01 06:40:18 UTC) #2
iposva
http://codereview.chromium.org/2817043/diff/17003/25010 File net/proxy/proxy_resolver_v8.cc (right): http://codereview.chromium.org/2817043/diff/17003/25010#newcode292 net/proxy/proxy_resolver_v8.cc:292: global_template->Set(ASCIILiteralToV8String("alert"), alert_template); For short strings like these the memory ...
10 years, 5 months ago (2010-07-01 17:13:13 UTC) #3
eroman
http://codereview.chromium.org/2817043/diff/17003/25009 File net/proxy/proxy_resolver_perftest.cc (right): http://codereview.chromium.org/2817043/diff/17003/25009#newcode169 net/proxy/proxy_resolver_perftest.cc:169: int rv = resolver_->SetPacScriptByData(ASCIIToUTF16(file_contents), NULL); On 2010/07/01 06:40:19, willchan ...
10 years, 5 months ago (2010-07-01 18:32:54 UTC) #4
iposva
10 years, 5 months ago (2010-07-01 18:39:36 UTC) #5
The V8 pieces LGTM!

-Ivan

Powered by Google App Engine
This is Rietveld 408576698