fluent / fluent/fluent-logger-python
Use actual bytesarray/memoryview instead of bytes concatenation
Ouverte
- Langage dominant
- Python
- Étoiles
- 457
- Forks
- 138
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
Bytes concatenation such as this is extremely wasteful and is never a good idea.
https://github.com/fluent/fluent-logger-python/blob/master/fluent/sender.py#L137
```python
# buffering
if self.pendings:
self.pendings += bytes_
bytes_ = self.pendings
```
Python has mutable buffers that should be used to ensure that the objects aren't created needlessly putting pressure on GC and wasting CPU with double-copy concatenation.
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Évaluation
Cette issue n'a pas encore été évaluée.