diff options
author | billyevans <pervushinai@gmail.com> | 2018-07-20 14:11:41 -0700 |
---|---|---|
committer | Jeff Widman <jeff@jeffwidman.com> | 2018-10-29 12:57:42 -0700 |
commit | 3689da3d5c02e362d872cf1fb2d65201419c4b93 (patch) | |
tree | a6952876d9086a5b975eef0ab155a182e24876b7 /kafka/admin/kafka.py | |
parent | 4d13713c515796afa535e980b15fa0c2c86ba0eb (diff) | |
download | kafka-python-3689da3d5c02e362d872cf1fb2d65201419c4b93.tar.gz |
Pre-compile pack/unpack function calls
I noticed that pack/unpack functions from
https://github.com/dpkp/kafka-python/blob/master/kafka/protocol/types.py
might be slightly improved. I made pre-compilation for them. It gives
about 10% better performance compared to the current implementation.
Consumption of 100msg:
```
239884 0.187 0.000 0.287 0.000 types.py:18(_unpack) # new version
239884 0.192 0.000 0.323 0.000 types.py:17(_unpack)
```
I also made some profiling for producers/consumers. It gives about
1-1.5% time savings.
Diffstat (limited to 'kafka/admin/kafka.py')
0 files changed, 0 insertions, 0 deletions