I’m working on a simple standalone plugin for a RPi touch screen interface. It runs seamlessly on my laptop, and it seems like it shouldn’t be too much for the Pi to handle, but performance is agonizingly slow, like 5-10 seconds to respond to keystrokes. Does anyone have experience or tips for faster performance? Thanks!
Can you run a profiler on the code? You need to find where the bottle neck is.
Failing that, try using less code!!!
Beneath trying to find the bottleneck by profiling and trying to optimize your code, depending on what you are doing in your callbacks it might be an option to do some operations async instead of performing them right away on the message thread. But that’s just a shot in the dark. What operations are you performing that make the PI responding so slow?
Really no clue what’s slowing it down so much, there’s no DSP to speak of, the plugin is a sequencer that only produces MIDI output. My only guess is that I’m using a
highResolutionTimer to update the MIDI and graphics. As per your and @DaveH suggestion I’m trying to set up profiling with gprof so I guess I’ll see.