adammitchelldev / adammitchelldev/le

Display buffer should not be recreated each update

未关闭
#1 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
enhancement
主要语言
C
星标
2
派生
0
PR 合并指标
30 天内没有已合并 PR

描述

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.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。