⏭ Improve import speed

(This is the maximum speed Python can do)
This commit is contained in:
Sam 2022-01-19 23:58:07 +08:00
parent e318562b16
commit 3812c5c584
Signed by: sam01101
GPG Key ID: 42D7B6D13FF5E611
2 changed files with 4 additions and 3 deletions

View File

@ -35,14 +35,14 @@ class ContinuePropagation(StopAsyncIteration):
pass
import asyncio
from asyncio import get_event_loop
from . import raw, types, filters, handlers, emoji
from .client import Client
from .sync import idle
# Save the main thread loop for future references
main_event_loop = asyncio.get_event_loop()
main_event_loop = get_event_loop()
CRYPTO_EXECUTOR_SIZE_THRESHOLD = 512

View File

@ -18,9 +18,10 @@
from importlib import import_module
from . import types, functions, base, core
from .all import objects
for k, v in objects.items():
path, name = v.rsplit(".", 1)
objects[k] = getattr(import_module(path), name)
from . import base # noqa: F401