Poor browser performance

With RK3588 Pocket Reform + Firefox 138/139, I found some sites, such as MotionMark and RP2040 datasheet are unusually slow and laggy.
After some investigations, the bottleneck was turned out to be texture format conversions in Mesa.

I managed to workaround this by applying a small patch to Mesa.
With this patch, MotionMark score drastically jumped up from 19.27 to 115.66!



Also there were noticeable performance improvements on various sites.

As I tested on Gentoo, I wonder if the same thing happens on Debian. Could someone confirm this? With that, I would report this issue to the upstream.

Below are commands I used to build Mesa:

# latest hash 0d3ffd8275087bc7f5b872303338ab10dcf287d9
git clone --depth=1 https://gitlab.freedesktop.org/mesa/mesa.git
cd mesa
curl -L 'https://raw.githubusercontent.com/mojyack/etc-portage/refs/heads/musl/patches/media-libs/mesa/panfrost-enable-blit.patch' | patch -p1
meson setup build --buildtype=debugoptimized --prefix=/tmp/rootfs -Dgallium-drivers=panfrost -Dplatforms=wayland -Dglx=disabled
ninja -C build install
LD_LIBRARY_PATH=/tmp/rootfs/lib firefox
1 Like