Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display buffer should not be recreated each update #1

Open
adammitchelldev opened this issue Sep 20, 2018 · 0 comments
Open

Display buffer should not be recreated each update #1

adammitchelldev opened this issue Sep 20, 2018 · 0 comments
Labels
enhancement New feature or request

Comments

@adammitchelldev
Copy link
Owner

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.

@adammitchelldev adammitchelldev added the enhancement New feature or request label Sep 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant