From a0cc55037ebbfcabb08eaefaa0e8e92a10b03475 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Fri, 19 Sep 2014 11:35:01 +0200 Subject: [PATCH] webelem: Get rid of functools.wraps/functools.update_wrapper. --- qutebrowser/browser/webelem.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qutebrowser/browser/webelem.py b/qutebrowser/browser/webelem.py index 4dde0b5b8..a613409f1 100644 --- a/qutebrowser/browser/webelem.py +++ b/qutebrowser/browser/webelem.py @@ -98,15 +98,15 @@ class WebElementWrapper(collections.abc.MutableMapping): method = getattr(self._elem, name) - @functools.wraps(method) def _wrapper(meth, *args, **kwargs): # pylint: disable=missing-docstring self._check_vanished() return meth(*args, **kwargs) wrapper = functools.partial(_wrapper, method) - functools.update_wrapper(wrapper, method) - + # We used to do functools.update_wrapper here, but for some reason + # when using hints with many links, this accounted for nearly 50% + # of the time when profiling, which is unacceptable. setattr(self, name, wrapper) def __str__(self):