diff options
author | lovetox <philipp@hoerist.com> | 2020-04-13 16:08:25 +0300 |
---|---|---|
committer | lovetox <philipp@hoerist.com> | 2020-04-13 16:08:25 +0300 |
commit | cb5aef14603b1944915d668fa3e72451be579040 (patch) | |
tree | d8768b2808f7396cfd54c93572dd96afeaed321b /nbxmpp | |
parent | b169eb1a940d9ee06115c30117ce923d1b3b9f57 (diff) |
Protocol: Cache JID parsing results
Diffstat (limited to 'nbxmpp')
-rw-r--r-- | nbxmpp/protocol.py | 2 |
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 |