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

Unified Diff: net/proxy/proxy_service.h

Issue 2893005: Change the default number of proxy resolver threads used for evaluating PAC s... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Address wtc comments Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/service/net/service_url_request_context.cc ('k') | net/proxy/proxy_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/proxy_service.h
===================================================================
--- net/proxy/proxy_service.h (revision 51924)
+++ net/proxy/proxy_service.h (working copy)
@@ -137,6 +137,22 @@
// the proxy settings change. We take ownership of |proxy_config_service|.
// Iff |use_v8_resolver| is true, then the V8 implementation is
// used.
+ //
+ // |num_pac_threads| specifies the maximum number of threads to use for
+ // executing PAC scripts. Threads are created lazily on demand.
+ // If |0| is specified, then a default number of threads will be selected.
+ //
+ // Having more threads avoids stalling proxy resolve requests when the
+ // PAC script takes a while to run. This is particularly a problem when PAC
+ // scripts do synchronous DNS resolutions, since that can take on the order
+ // of seconds.
+ //
+ // However, the disadvantages of using more than 1 thread are:
+ // (a) can cause compatibility issues for scripts that rely on side effects
+ // between runs (such scripts should not be common though).
+ // (b) increases the memory used by proxy resolving, as each thread will
+ // duplicate its own script context.
+
// |url_request_context| is only used when use_v8_resolver is true:
// it specifies the URL request context that will be used if a PAC
// script needs to be fetched.
@@ -150,6 +166,7 @@
static ProxyService* Create(
ProxyConfigService* proxy_config_service,
bool use_v8_resolver,
+ size_t num_pac_threads,
URLRequestContext* url_request_context,
NetLog* net_log,
MessageLoop* io_loop);
« no previous file with comments | « chrome/service/net/service_url_request_context.cc ('k') | net/proxy/proxy_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698