# Project lags when performing large-scale broadcasts

In this project, when you press a number key from 0-7, it will change the color and gimmick of the heart.
This is meant to be a seamless transition, however, there's a tremendous lagspike every time.
I suspect this could be because of the amount of sprites that respond to the broadcast soulVisual at once, but I don't know how to optimize it any further... Please help?

Delay bettwen keypress and receive("soulVisula")@soulHitbox is 400-1000 ms, for my computer.
Where are permanently 8 processes. Sometimes >20.
Turning the longest script into custom blocks reduced the delay by half. There seems to be a huge penalty for starting long script.
You may log delay for every "receive" event to see a bottleneck.

BTW: there is no reason to update "HP" 60 times/s. UI elements can be updated at rate of 5-10 per second.

I was skeptical at first, but this actually works better! Thank you.

One of the gimmicks involves moving the box and UI elements, so if I did that it would be very choppy...

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.