adammitchelldev / adammitchelldev/le

Display buffer should not be recreated each update

Aberta
#1 0 comentários 0 reações 0 responsáveis Ver no GitHub
enhancement
Linguagem predominante
C
Estrelas
2
Forks
0
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

Currently the display buffer is recreated each update. Kilo's default implementation mallocs a new 0 length buffer, uses realloc *every append* and frees the buffer when it is done.

Ideally, the display updater is passed a buffer that it can overwrite and re-use. The buffer can be longer than required so long as the number of characters to write is tracked and passed into ```write(...)```.

A set-length self-flushing buffer could be used so long as *appends* are partially written if they exceed the buffer limit. Probably needs a unit test.

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.