Add throttle function to reduce mousemove event