diff options
author | Andrej Shadura <andrewsh@debian.org> | 2022-02-08 23:16:11 +0100 |
---|---|---|
committer | Andrej Shadura <andrewsh@debian.org> | 2022-02-08 23:16:11 +0100 |
commit | c67eee54fd48a2e25a91e34498ad01c5f902d53c (patch) | |
tree | 25c0fa9e55e01bf86dae6a0395f20d868364eddc /synapse/app/_base.py | |
parent | 0027c02b907486b437772b1cdecbea14d18597d9 (diff) |
New upstream version 1.52.0
Diffstat (limited to 'synapse/app/_base.py')
-rw-r--r-- | synapse/app/_base.py | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/synapse/app/_base.py b/synapse/app/_base.py index 579adbbc..bbab8a05 100644 --- a/synapse/app/_base.py +++ b/synapse/app/_base.py @@ -16,7 +16,6 @@ import atexit import gc import logging import os -import platform import signal import socket import sys @@ -436,7 +435,8 @@ async def start(hs: "HomeServer") -> None: # before we start the listeners. module_api = hs.get_module_api() for module, config in hs.config.modules.loaded_modules: - module(config=config, api=module_api) + m = module(config=config, api=module_api) + logger.info("Loaded module %s", m) load_legacy_spam_checkers(hs) load_legacy_third_party_event_rules(hs) @@ -468,15 +468,13 @@ async def start(hs: "HomeServer") -> None: # everything currently allocated are things that will be used for the # rest of time. Doing so means less work each GC (hopefully). # - # This only works on Python 3.7 - if platform.python_implementation() == "CPython" and sys.version_info >= (3, 7): + # PyPy does not (yet?) implement gc.freeze() + if hasattr(gc, "freeze"): gc.collect() gc.freeze() - # Speed up shutdowns by freezing all allocated objects. This moves everything - # into the permanent generation and excludes them from the final GC. - # Unfortunately only works on Python 3.7 - if platform.python_implementation() == "CPython" and sys.version_info >= (3, 7): + # Speed up shutdowns by freezing all allocated objects. This moves everything + # into the permanent generation and excludes them from the final GC. atexit.register(gc.freeze) |