mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 19:47:34 +00:00
LibLine: Avoid excessive write() syscalls when refreshing the display
Previously, we were generating the display update one character at a time, and writing them one at a time to stderr, which is not buffered, doing so caused one syscall per character printed which is s l o w (TM) This commit makes LibLine write the update contents into a buffer, and flush it after all the update is generated :^)
This commit is contained in:
parent
0f6654fef2
commit
3184086679
5 changed files with 126 additions and 110 deletions
|
@ -383,7 +383,7 @@ private:
|
|||
}
|
||||
|
||||
void recalculate_origin();
|
||||
void reposition_cursor(bool to_end = false);
|
||||
void reposition_cursor(OutputStream&, bool to_end = false);
|
||||
|
||||
struct CodepointRange {
|
||||
size_t start { 0 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue