Optimization¶
Optimized mode¶
coredis can be run in optimized mode to boost performance. In this mode the following behaviors are disabled:
Runtime validation of parameter combinations for redis commands that can take various combinations of inputs (examples:
set()
orxadd()
)Validation of correct use of iterables as parameters
Compatibility checks by redis server version
Optimized mode can be enabled in any of the following ways:
Set the environment variable
COREDIS_OPTIMIZED
totrue
Run Python in optimized mode with
-O
or settingPYTHONOPTIMIZE
Explicitly with
coredis.Config.optimized=True