Running scripts in parallel - laggy performance?

I use Alarmo for my alarm system. I have 2 scripts that are executed if the alarm is triggered

  1. Play a siren WAV file on 4 Sonos repeating in a loop until the alarm is disarmed
  2. Flash all lights (about 30 individual lights) in the apartment in red until the alarm is disarmed.

It generally works and the lights flash and the sound plays in parallel but what I notice is that the sound “stutters” or is somehow choppy. Also the lights don’t flash right away but take quite some time to start flashing.

Also when I disarm it takes maybe 15 seconds until the sound stops and lights go out again.

It all seems very laggy as if HA is completely overwhelmed. I run HA on a Home Assistant Yellow with a Raspi 4 board.

Could it be that it is a performance issue?