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

Speed, lots of it! #400

Open
ropg opened this issue Mar 14, 2024 · 0 comments
Open

Speed, lots of it! #400

ropg opened this issue Mar 14, 2024 · 0 comments

Comments

@ropg
Copy link
Contributor

ropg commented Mar 14, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant