-
RDP sessions that use H.264 video, which is every KRDP session, no longer lose about 80ms per frame to moving the decoded frame between the decoder and the renderer (#466, reported by @ysalmon).
-
The decoded frame was being handed back the expensive way (#466, reported by @ysalmon). Haven decodes H.264 with the phone's hardware decoder and then has to get the picture from the Android side to the Rust side that draws it. It did that by returning the frame as a buffer for the bridge between the two languages to carry across. That crossing cost about 47ms for a single 1080p frame.
It is not the copying. The same 3MB copied inside Rust takes 0.06ms, and every individual step of the bridge's own conversion runs at tens of gigabytes per second. The cost is in the crossing itself, it is proportional to the number of bytes, and it works out at about 62 MB/s — roughly 725 times slower than moving the same bytes any other way.
The decoder now writes the frame straight into the buffer the renderer already owns, so nothing is carried across. Same picture, same decoder, same packing code and the same tests over it; only the handoff changed.
Measured with a stand-in decoder that does no decoding at all, so the number is the crossing and nothing else: 47.4ms to 0.30ms for a 1080p frame. There is a rig for this in the repository, because the measurement needs no RDP server, no H.264 and no phone, and the next person to touch this boundary should be able to check it in a minute.
What this does not fix, from the same reporter's measurements: the hardware decode itself at 9-25ms per frame, and packing the decoder's output at 6-29ms. Those remain, and the second one is now the largest thing left.
Not verified end to end on a device. The only H.264 server available here needs a Wayland session that this machine cannot give it, so the boundary is measured directly and the pixel path is covered by unit tests rather than by a real KRDP session. The reporter has captured logs through six releases; this one changes what those logs should say.
Which APK?
haven-<version>-<abi>-release.apk — the full app, and what F-Droid
carries. If in doubt, take this one.
haven-<version>-<abi>-terminal-release.apk — the same app with the
desktop and media parts left out, for people who only use Haven for SSH,
terminals, files and storage. Less than half the size on arm64. It drops
RDP and SPICE remote desktop, the native Wayland desktop, and ffmpeg — so
no media conversion, and no video previews or streaming in the file
browser. VNC is kept, so a Linux desktop running inside Haven's guest
still works.
Both are signed with the same key and carry the same version number, so
you can install either over the other without losing connections, keys or
your Linux guest. The shared version number does mean an updater will not
offer to move you between them — switching is a deliberate download.
<abi> is your device's CPU: arm64 for essentially every modern phone,
armv7 for older 32-bit devices, x64 for emulators.
What's Changed
New Contributors
Full Changelog: v5.87.60...v5.87.61