adammitchelldev / adammitchelldev/le
Display buffer should not be recreated each update
未關閉
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 還沒有評估資料。