Latency when using SmartApps

I created a SmartApp and I notice a delay ranging between 2 to 5 seconds for changing the device state. However, with the SmartThings mobile app, the state changes are almost instantaneous.

Are there any tuning options that I could use in my SmartApps’ groovy script?