To sum it up, i have the following Code in a channel:

on *:LOGON:*:{
raw CAP REQ :twitch.tv/membership
raw CAP REQ :twitch.tv/tags
raw CAP REQ :twitch.tv/commands
/debug @raw
}

raw USERNOTICE:*:{
if (($msgtags(msg-id).key == subgift) && ($1 == #couragejd)) {
var %nick_from $iif($msgtags(display-name).key, $v1, $msgtags(login).key) , %nick_to $iif($msgtags(msg-param-recipient-display-name).key, $v1, $msgtags(msg-param-recipient-user-name).key)
describe $1 keviskAww NEW SUB!! courageHEART Thank you %nick_to for subscribing with a gifted sub from %nick_from courageLOGO ausHype courageLOGO
}

raw USERNOTICE:*:{
if (($msgtags(msg-id).key == sub) && ($1 == #couragejd)) {
var %nick $iif($msgtags(display-name).key, $v1, $msgtags(login).key)
msg $1 keviskAww NEW SUB!! courageHEART %nick welcome to the Courageous!! courageLOGO ausHype courageLOGO
}
elseif (($msgtags(msg-id).key == resub) && ($1 == #couragejd)) {
var %nick $iif($msgtags(display-name).key, $v1, $msgtags(login).key)
if ($0 == 1) {
msg $1 courageLOGO courageHEART RESUB!! %nick welcome back to the courageous for $msgtags(msg-param-months).key months in a row! courageHEART courageLOGO
}
else {
msg $1 courageLOGO courageHEART RESUB!! %nick welcome back to the courageous for $msgtags(msg-param-months).key months in a row! courageHEART courageLOGO Left a note: $qt($2-)
}
}
}

This works perfectly at announcing subs. However when there tends to be a larger amount of subs at one time as seen in this gyazo --> https://gyazo.com/f1d6c2bb0b25ee75bd90fc1598efa4d0 the messages send to chat delayed. Slowly announcing one at a time in chat instead of instant, this slows down my bot across all channels until its finished announcing all the subs in said chat. Is this just an issue with my script or a delay issue im unaware of with the twitch server? And how can i improve this response time.