The closer your laptop is to the router and the router to the ATV the better. Mine used to suck until I moved everything within 10 feet.
Now it works very very good. Only lags every once and a while. Also the mouse has a lot less latency now.
To make it even better I connected the atv wired through ethernet, that also helped a lot.
Check this out, if your router has QoS settings that helps a lot as well.
http://isource.com/2012/03/31/a-few-tips-for-improving-airplay-mirroring/