When in low light the AF will be slower and hesitating. This is not unique to Xperia S. Any digital camera using AF(either phase detection or contrast detection) are like this.
This is also why on most digital cameras there is a "AF assist lamp" to help the low-light AF situations.
Try turn the video recording light on and make it the "AF assist lamp".
HTC One M8 Developer Edition
M8_UL_CA PVT SHIP UNLOCKED S-OFF
CID-BS_US001 | HBOOT-3.16.0.0000 | RADIO-1.16.21331931.LA11G | OpenDSP-v38.2.2-00542-M8974.0311 | OS-1.54.1540.9