Please help to make this code run faster and no delays

No, it wouldn't.