cache getBounds and optimize Canvas events