Skip to content

Speed, lots of it! #400

Open
Open
@ropg

Description

@ropg

Making this an issue instead of a PR because I see an "issue" but am not sure it's in scope to fix: on Arduino, I just noticed the print functions do not actually print the whole string at once, even though the print Class does provide a char* function to print a bunch of chars at once. So my mechanism to inhibit writing to the display for every 'write' until the whole string is written never actually did anything and it actually redrew the text buffer every character, which just wasn't noticed because the library is so damn fast. But naturally printing and scrolling could be even faster if we fixed this somehow.

A fix would entail a 1 ms timer that is restarted every time a character is written, and then the actual drawLogBuffer only happens when the timer reaches zero. But that would involve platform-dependent things like timers, which I'd be happy to do for ESP32 just because it's fun to make it really cool, but I'm also not sure we should. I could use the last timer, and hope the user in their code doesn't use that. But it might get a bit iffy. And these displays are tiny, so it's not like people cat large text files to it.

Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions