Sampling too low when sending data to google sheets

Hello, I have a problem with sending data from my app to google sheets. The speed of sending data to sheet is too low and too many data is not sent. When I send data by button, the speed is higher than in loop. Do you know how to fix it?