From 05399ecaa119baa2631d496f34e5093fa6f4b2cb Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Sat, 27 Jan 2018 11:13:12 +0200 Subject: [PATCH] Add recommendations to installations instruction. --- dev_requirements.txt | 2 ++ docs/source/install.rst | 28 ++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/dev_requirements.txt b/dev_requirements.txt index 1d976556..93a20597 100644 --- a/dev_requirements.txt +++ b/dev_requirements.txt @@ -8,3 +8,5 @@ uvloop>=0.9.1 aioredis>=1.0.0 wheel>=0.30.0 rethinkdb>=2.3.0 +sphinx>=1.6.6 +sphinx-rtd-theme>=0.2.4 diff --git a/docs/source/install.rst b/docs/source/install.rst index 016cba94..3191305f 100644 --- a/docs/source/install.rst +++ b/docs/source/install.rst @@ -14,3 +14,31 @@ From sources $ git clone https://github.com/aiogram/aiogram.git $ cd aiogram $ python setup.py install + + +Recommendations +--------------- +You can speedup your bots by following next instructions: + +- Use `uvloop `_ instead of default asyncio loop. + + *uvloop* is a fast, drop-in replacement of the built-in asyncio event loop. uvloop is implemented in Cython and uses libuv under the hood. + + **Installation:** + + .. code-block:: bash + + $ pip install uvloop + + +- Use `ujson `_ instead of default json module. + + *UltraJSON* is an ultra fast JSON encoder and decoder written in pure C with bindings for Python 2.5+ and 3. + + **Installation:** + + .. code-block:: bash + + $ pip install ujson + +In addition, you don't need do nothing, *aiogram* is automatically starts using that if is found in your environment.