Skip to content

Buffer flicker #7

@TheAhmir

Description

@TheAhmir

On some machines, the text editor flickers. This is caused by repeatedly clearing and redrawing the entire screen at 30 frames per second and causes unnecessary CPU usage.

ideas to fix this:

  • change the term.ui source code to allow event driven ui and event functions. doing this would allow discarding framerate all together, only redrawing when necessary. This solution also requires that the blinking cursor logic (which is tied to the frame rate) be moved to a lightweight timer implementation or additional feature in the term.ui source.

  • implement changes to remove tui.clear() from the ui_loop. and tui.flush only relevant changes. this reduces CPU load but still renders 30 frames per second unnecessarily; however, this doesn't require changing the core tui library code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions