From 18be5c254a48590b81dfc492ed15f36f11be8cd9 Mon Sep 17 00:00:00 2001 From: Strahinja Val Markovic Date: Fri, 7 Feb 2014 12:46:45 -0800 Subject: [PATCH] Increasing worker thread count to 30 If it takes a while to compile the user's C++ file, the YCM client/server may run out of threads. Vim gets laggy then. This is a stopgap measure until I think of something better. --- python/ycm/client/base_request.py | 2 +- python/ycm/server/ycmd.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python/ycm/client/base_request.py b/python/ycm/client/base_request.py index eac0830f..94ac8c0b 100644 --- a/python/ycm/client/base_request.py +++ b/python/ycm/client/base_request.py @@ -28,7 +28,7 @@ from ycm import vimsupport from ycm.server.responses import ServerError, UnknownExtraConf HEADERS = {'content-type': 'application/json'} -EXECUTOR = UnsafeThreadPoolExecutor( max_workers = 10 ) +EXECUTOR = UnsafeThreadPoolExecutor( max_workers = 30 ) # Setting this to None seems to screw up the Requests/urllib3 libs. DEFAULT_TIMEOUT_SEC = 30 diff --git a/python/ycm/server/ycmd.py b/python/ycm/server/ycmd.py index fac6b2f8..aa10923f 100755 --- a/python/ycm/server/ycmd.py +++ b/python/ycm/server/ycmd.py @@ -91,7 +91,7 @@ def Main(): waitress.serve( handlers.app, host = args.host, port = args.port, - threads = 10 ) + threads = 30 ) if __name__ == "__main__":