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

screen q size / indicator #1741

Open
catfact opened this issue Nov 24, 2023 · 4 comments
Open

screen q size / indicator #1741

catfact opened this issue Nov 24, 2023 · 4 comments

Comments

@catfact
Copy link
Collaborator

catfact commented Nov 24, 2023

like an idiot, i entirely forgot i had added a visual "warning" for when the screen event queue is filled.

in a way it's good that we know some scripts are hitting the Q capacity. but it makes me wonder if the Q shouldn't be bigger / grow as needed. (we don't say that you can't queue up thousands of drawing requests at once.)

@tlubke
Copy link
Contributor

tlubke commented Nov 24, 2023

This conversation on lines gave me an idea.

Apologies if I’m misunderstanding the actual issue, but: if the queue is long enough would it make sense to skip queue entries rather than flush the queue entirely? e.g., every other or every 4th entry or whatever. Basically rather than having the script author reduce their framerate, reduce it for them at the system level 🤔

no, it’s not a queue of frames

The idea is pretty simple -- anytime the queue needs to skip an entry, we can clear everything up until the next SCREEN_UPDATE event. Though it's not a queue of frames exactly, it is a queue of events that make up frames.

That probably wouldn't fix the case where there are enough drawing requests to fill up the queue before a screen update event. I think your idea for a dynamically resizing queue makes a lot of sense for that reason.

@xmacex
Copy link

xmacex commented Nov 29, 2023

For documentation, the flashes look like this; a single-frame half-screen yellow rectangle.

VID_20231123_230030_exported_7697.jpg

@catfact
Copy link
Collaborator Author

catfact commented Dec 4, 2023

i'm on coding hiatus for the month but will get back to this (and other small norns issues) in the new year. sorry for the delay. if anyone wants to adjust the white square appearance (for visual sensitivity), that is here:
https://github.com/monome/norns/blob/main/matron/src/screen_events.c#L596-L608

(idk why i put several updates in a row. this has the vibe of something done in the deep frantic midst of a long session.)

and the q size is here:
https://github.com/monome/norns/blob/main/matron/src/screen_events.c#L11

@dndrks
Copy link
Member

dndrks commented Dec 7, 2023

just for testing any future changes, acrostic has a lot of queue-filling redraws and is a reliable test candidate

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

4 participants