RemoteWebViewClient icon indicating copy to clipboard operation
RemoteWebViewClient copied to clipboard

Option to "stop/slow/pause rendering".

Open vantreeseba opened this issue 1 year ago • 3 comments

If the esp32 config could call some trigger to tell client to:

  1. request frames at a slower rate (every_nth_frame).
  2. pause rendering
  3. stop rendering / reconnect later

Or something along those lines, it would prevent the server from calling/rendering in the background as much and lower cpu usage. Not that this is a performance problem, but more of a "why do work that's not being used."


My personal use case is turning off backlight after X seconds of inactivity, or when no presence detected in a room. This would allow the "server renderer" to go idle / slow down when the client is not actively requesting updates.

I'm sure this would involve the server as well, so I'm not sure which repo it should go in.


Anyway, thanks for this awesome project, I may take a look at the code myself as well and see if I could figure out some simple implementation of this as a POC.

vantreeseba avatar Nov 07 '25 01:11 vantreeseba

I understand the use case, and it makes sense. Option one would lead to a missed frame, so it's better not to use it. Overall, the implementation depends on what CDP supports. If there's a pause and, after resuming, it sends a new frame, that's ideal. If the pause is longer, disconnecting is probably the best approach.

I'll keep this open, but it's a low priority for me. I plan to release a new version with HW decoding (ESP32-P4) and hopefully switch to other tasks for a while.

strange-v avatar Nov 07 '25 15:11 strange-v

Well, I came here for that :-) Same case, on low end hardware the rendering takes unnecessary ressources even when the client screen is off.

neuroverflow avatar Jun 01 '26 14:06 neuroverflow

I switched from a powerful server to one that's not as great, so this has become a concern of mine as well. In my case if there is a card that animates, CPU usage goes through the roof. I can't control the animation in some cases, and don't want to in others.

I like #1 as it means I can still show updates, just more slowly. Skipped frames are a non issue for things like a sun animation on a weather card, or camera feeds, when the display is idle. The user can wake it to get more frequent updates.

RyanEwen avatar Nov 18 '26 17:11 RyanEwen