fluent / fluent/fluent-logger-python

Use actual bytesarray/memoryview instead of bytes concatenation

Abierto
#113 0 comentarios 0 reacciones 0 asignados Ver en GitHub
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.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.