# How to speed up mouse events?

Grids of dynamic objects responding to mouseovers seem to be quite slow in general, for instance:

Grid[Table[
Mouseover[Framed[" ", Background -> Blue],
Framed[" ", Background -> White]], {i, 50}, {j, 50}],
Spacings -> {0, 0}]


How can this lagging be avoided?

-
It seems reasonably fast to me; how much lag are you seeing? –  Mr.Wizard May 28 '12 at 8:05
About a second, but If you increase the size of the grid it gets worse fast. –  M.R. May 28 '12 at 8:09
Okay, if I make the grid bigger, e.g. 150x150 I see the lag. What is your application for this many Mouseovers? Perhaps there is a faster approach. –  Mr.Wizard May 28 '12 at 8:12
What platform as you on? Linux? On a fairly outdated Windows machine I can highlight about 6-8 cells per second. –  Szabolcs May 28 '12 at 8:21
I had similar problems: I wanted the user to be able to click on a grid. Solved the problem by having just one click event and determining the bin from the mouse coordinates manually. –  Ajasja May 28 '12 at 13:17

Grid[Table[