Raspberry Pi issues with Snap!Bridge Arcade

This is by way of a "Hail Mary" regarding the Raspberry Pi. We created a Snap! arcade using a Raspberry Pi with SnapBridge linked to a micro:bit. This worked well until the Raspberry Pi folks updated the Raspberry Pi operating system, and in the process broke the ability of the Raspberry Pi 3 to operate a monitor in the portrait model.

Since we had a proof-of-concept (we thought) that verified that this worked, we upgraded to the Raspberry Pi 4. The Raspberry Pi 4 works well with the monitor in the portrait mode, but now Snap!Bridge is laggy. John Maloney has been investigating the issue, but so far has not identified a fix.

To sum up: Snap!Bridge works well on the Raspberry Pi 3, but there is substantial lag on the Raspberry Pi 4. At this point we don't have even the glimmer of a theory as to why the latency is greater for the newer model.

Any suggestions at all would be welcome.

John identified the problem. The loop in MicroBlocks (on the micro:bit side) that monitors the status of the joystick was sending updates to the Snap! program every 16 milliseconds. The update frequency was overwhelming the Snap! program on the Raspberry Pi. Consequently, the other Snap! processes did not have time to run.

The update frequency had not presented an issue on a Mac or Windows PC, but the Raspberry Pi didn't have the capacity to keep up. We changed the update frequency (on the MicroBlocks side) from 16 milliseconds to 100 milliseconds , and that resolved the issue on the Raspberry Pi.