⏭ Improve import speed
(This is the maximum speed Python can do)
This commit is contained in:
parent
e318562b16
commit
3812c5c584
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user