Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/python-nbxmpp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlovetox <philipp@hoerist.com>2020-04-13 16:08:25 +0300
committerlovetox <philipp@hoerist.com>2020-04-13 16:08:25 +0300
commitcb5aef14603b1944915d668fa3e72451be579040 (patch)
treed8768b2808f7396cfd54c93572dd96afeaed321b
parentb169eb1a940d9ee06115c30117ce923d1b3b9f57 (diff)
Protocol: Cache JID parsing results
-rw-r--r--nbxmpp/protocol.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/nbxmpp/protocol.py b/nbxmpp/protocol.py
index ca978d6..9c7e915 100644
--- a/nbxmpp/protocol.py
+++ b/nbxmpp/protocol.py
@@ -21,6 +21,7 @@ sub- stanzas) handling routines
import time
import hashlib
import socket
+import functools
from base64 import b64encode
from precis_i18n import get_profile
@@ -732,6 +733,7 @@ stream_exceptions = {'bad-format': BadFormat,
'xml-not-well-formed': XMLNotWellFormed}
+@functools.lru_cache(maxsize=None)
def parse_jid(jid):
# https://tools.ietf.org/html/rfc7622#section-3.2