fluent / fluent/fluent-logger-python
Use actual bytesarray/memoryview instead of bytes concatenation
Abierto
- Lenguaje dominante
- Python
- Estrellas
- 457
- Forks
- 138
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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.
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.