Expose JPEG decoder timeout_ms as a configurable parameter (ESP32-P4)
Summary
On an ESP32-P4 (CrowPanel Advanced 10.1", engineering-sample silicon), JPEG tile decoding is consistently slow and dominated by repeated internal decoder timeouts — even against the built-in self-test page. This makes scrolling through a real Home Assistant dashboard extremely sluggish (multi-second delay per scroll movement) and produces visible corrupted/discolored tile artifacts that persist until overwritten by a later update.
I'd like to request that timeout\_ms for the JPEG decoder engine be exposed as a configurable YAML parameter, the same way jpeg\_quality and max\_bytes\_per\_msg already are.
Environment
Board: Elecrow CrowPanel Advanced 10.1" (ESP32-P4 + ESP32-C6 co-processor)
Chip: ESP32-P4 rev1.3, engineering\_sample: true
ESPHome: 2026.8.2
ESP-IDF: 5.5.5
remote_webview component: pulled from github://strange-v/RemoteWebViewClient@main
Display: 1024x600, MIPI-DSI, hw\_jpeg: yes
Symptom
Individual tile decodes routinely hit an internal timeout and appear to retry multiple times before eventually succeeding, resulting in a consistent ~1600ms per-frame completion time even for small partial updates. This happens:
On the built-in self-test page, not just real dashboard content
Regardless of jpeg\_quality, max\_bytes\_per\_msg, tile\_size, min\_frame\_interval, or big\_endian settings (see "Already tried" below)
Most visibly during scrolling, where the rapid sequence of partial updates makes the slowdown and artifacts obvious, though the same underlying decode timeouts are present at idle too
Log excerpt
\[03:35:55.979] E jpeg.decoder: jpeg\_decoder\_process(322): jpeg-dma2d handle jpeg decode timeout, please check image accuracy and `timeout\_ms`
\[03:35:56.226] E jpeg.decoder: jpeg\_decoder\_process(322): jpeg-dma2d handle jpeg decode timeout...
\[03:35:56.533] E jpeg.decoder: jpeg\_decoder\_process(322): jpeg-dma2d handle jpeg decode timeout...
\[03:35:56.747] E jpeg.decoder: jpeg\_decoder\_process(322): jpeg-dma2d handle jpeg decode timeout...
\[03:35:56.791] E jpeg.decoder: jpeg\_decoder\_process(322): jpeg-dma2d handle jpeg decode timeout...
\[03:35:57.045] E jpeg.decoder: jpeg\_decoder\_process(322): jpeg-dma2d handle jpeg decode timeout...
\[03:35:57.158] D Remote\_WebView: frame 60: tiles 18 (27171 bytes) - 1623 ms
\[03:35:57.200] E jpeg.decoder: jpeg\_decoder\_process(322): jpeg-dma2d handle jpeg decode timeout...
\[03:35:57.459] E jpeg.decoder: jpeg\_decoder\_process(322): jpeg-dma2d handle jpeg decode timeout...
\[03:35:57.602] E jpeg.decoder: jpeg\_decoder\_process(322): jpeg-dma2d handle jpeg decode timeout...
\[03:35:57.804] E jpeg.decoder: jpeg\_decoder\_process(322): jpeg-dma2d handle jpeg decode timeout...
\[03:35:58.069] E jpeg.decoder: jpeg\_decoder\_process(322): jpeg-dma2d handle jpeg decode timeout...
\[03:35:58.214] E jpeg.decoder: jpeg\_decoder\_process(322): jpeg-dma2d handle jpeg decode timeout...
\[03:35:58.478] E jpeg.decoder: jpeg\_decoder\_process(322): jpeg-dma2d handle jpeg decode timeout...
\[03:35:58.621] E jpeg.decoder: jpeg\_decoder\_process(322): jpeg-dma2d handle jpeg decode timeout...
\[03:35:58.621] D Remote\_WebView: frame 61: tiles 18 (27164 bytes) - 1623 ms
Note frames 60 and 61 both complete in almost exactly 1623ms despite slightly different byte sizes — this looks like it's hitting a fixed ceiling rather than varying organically with content complexity.
Already tried (none resolved it)
jpeg\_quality: 85 → 75
max\_bytes\_per\_msg: 14336 → 61440 → 102400
min\_frame\_interval: 80 → 40 → 120
big\_endian: true → false (changed artifact color from pink to gray, did not eliminate them)
full\_frame\_tile\_count: left at 4, have not yet tried 1
The actual ask
Espressif's own ESP-IDF docs for jpeg\_new\_decoder\_engine() show a reference timeout\_ms of 40, with the note that this "should be larger than valid decode time." That's a very tight ceiling for real-world content (icons, text, gradients) versus simple test patterns, and may be too aggressive for this specific engineering-sample silicon's JPEG-DMA2D peripheral.
Rather than asking for a fix to the underlying hardware/timing behavior (which may not be practical without the exact board in hand), I'd like to request timeout\_ms be surfaced as an optional YAML parameter on remote\_webview, alongside the existing jpeg\_quality and max\_bytes\_per\_msg options — so users hitting this on specific hardware can raise it themselves without needing a component change per board.
Happy to test a build with this exposed and report back results if that's useful.
1623 ms is a horrible result. I've already heard about issues with HW decoding...
Added
hw_decode: true/false
hw_decode_timeout_ms: 200
use
external_components:
- source: github://strange-v/RemoteWebViewClient@hw_test
refresh: 0s
components: [ remote_webview ]
In my case, MaTouch ESP32-P4 TFT with Touch 7" MIPI (1024x600) renders a HA map:
- software decoding: 160ms
- hardware: 19 ms
[D][Remote_WebView:416][rwv_decode]: frame 4965: tiles 1 (124498 bytes) - 19 ms
Thank you for the incredibly fast turnaround on this — really appreciate
you building hw_decode and hw_decode_timeout_ms and getting back to us
so quickly.
hw_decode fully resolves full-frame updates
Confirmed on our end too. Every full-page load/tab-switch now lands right
around 15-16ms, matching your own reported figures almost exactly, with
zero decode-timeout errors on that path. This part of the fix is completely
solid.
Scroll-generated partial tile updates still fail the same way
This is the one remaining piece worth flagging. Scrolling through a real
dashboard still consistently produces the same jpeg_decoder_process
timeout pattern we originally reported — repeated timeouts per frame, frame
completion times in the 800-2400ms range — regardless of hw_decode being
enabled. We tried a few things to narrow it down further:
hw_decode_timeout_ms: 200 (your suggested default) — scroll frames still
slow, same repeated timeout pattern
hw_decode_timeout_ms: 500 — actually made things worse (frames jumped to
3000-7500ms), which suggests these aren't close-call timeouts needing more
headroom — they seem to be genuinely, repeatedly failing regardless of the
time budget given
full_frame_tile_count: 1 (forcing scroll updates through the full-frame
path) — marginal improvement at best (frames now cluster around 800-1800ms
instead of 1000-2400ms), but the same repeated timeout pattern persists
This looks less like a timing/configuration issue and more like a
structural difference in how partial-tile decode requests are handled
versus full-frame ones — full-frame is rock solid, partial tiles from
scroll events consistently aren't, and nothing we've adjusted on the config
side changes that.
One more minor, related observation
Separately, we occasionally see small pink/discolored tile artifacts appear
and persist until overwritten by a later update — not frequent, just an
occasional block here and there. Given the above, this may well be
connected to whatever's happening with the partial-tile path specifically.
Where we've landed
For our actual use case (a status dashboard, not something we scroll
through constantly), the current behavior is genuinely usable as-is —
full-page navigation is fast and reliable, and scrolling just isn't
something we do much of. So this isn't urgent on our end, but wanted to
share the more precise data in case it's useful for tracking down the
underlying cause. Happy to keep testing if there's anything specific you'd
like us to try.
On Thu, Sep 3, 2026 at 4:31 PM strange_v @.***> wrote:
strange-v left a comment (strange-v/RemoteWebViewClient#39) https://github.com/strange-v/RemoteWebViewClient/issues/39#issuecomment-5531745439
1623 ms is a horrible result. I've already heard about issues with HW decoding...
Added
hw_decode: true/false hw_decode_timeout_ms: 200
use
external_components:
- source: @.***_test refresh: 0s components: [ remote_webview ]
In my case, MaTouch ESP32-P4 TFT with Touch 7" MIPI (1024x600) renders a HA map:
- software decoding: 160ms
- hardware: 19 ms
[D][Remote_WebView:416][rwv_decode]: frame 4965: tiles 1 (124498 bytes) - 19 ms
— Reply to this email directly, view it on GitHub https://github.com/strange-v/RemoteWebViewClient/issues/39?email_source=notifications&email_token=B6JUMPKAZQM2T23ZALJ5NLL5NHILDA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKNJTGE3TINJUGM42M4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KYZTPN52GK4S7MNWGSY3L#issuecomment-5531745439, or unsubscribe https://github.com/notifications/unsubscribe-auth/B6JUMPJZVAZ57N2IW7NZJKL5NHILDAVCNFSNUABGKJSXA33TNF2G64TZHMYTANJTGYZTSMZSGU5US43TOVSTWNJTGMZDEOBTGM2DJILWAI . Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS https://github.com/notifications/mobile/ios/B6JUMPMSR3KM6RRELQEYSLL5NHILDA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKNJTGE3TINJUGM42M4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KUZTPN52GK4S7NFXXG and Android https://github.com/notifications/mobile/android/B6JUMPMJJCDNK75WOHAUXWD5NHILDA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKNJTGE3TINJUGM42M4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2K4ZTPN52GK4S7MFXGI4TPNFSA. Download it today! You are receiving this because you authored the thread.Message ID: @.***>
Before digging deeper, could you retest with the latest versions (client and server)?