# HG changeset patch # User Marcin Kuzminski # Date 2019-07-18 15:17:27 # Node ID 45bacab2705f2f7b628dc3d1b1b72c0314fb6f7d # Parent f8c9c9e1164d45539d272985681e2e858f32ba4b logging: skip large attribute expansion on archive_repo. We don't need arguments there diff --git a/vcsserver/http_main.py b/vcsserver/http_main.py --- a/vcsserver/http_main.py +++ b/vcsserver/http_main.py @@ -352,8 +352,17 @@ class HTTPApplication(object): pass args.insert(0, wire) - log.debug('method called:%s with args:%s kwargs:%s context_uid: %s', - method, args[1:], kwargs, context_uid) + # NOTE(marcink): trading complexity for slight performance + if log.isEnabledFor(logging.DEBUG): + no_args_methods = [ + 'archive_repo' + ] + if method in no_args_methods: + call_args = '' + else: + call_args = args[1:] + log.debug('method called:%s with args:%s kwargs:%s context_uid: %s', + method, call_args, kwargs, context_uid) try: resp = getattr(remote, method)(*args, **kwargs)