adammitchelldev / adammitchelldev/le

Display buffer should not be recreated each update

オープン
#1 コメント 0 件 リアクション 0 件 担当者 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 を短くまとめたダイジェスト。