At the end of 2015, I was faced with the fact that I finally discovered this problem.
In my browser application, I draw several circles of different sizes in certain places, then drag the visible part of the general screen, showing only the circles from the full background that are visible at the current zoom level. Dragging the mouse generates a mousemove event, which triggers a call to my rendering procedure, which in turn triggers a redraw for each visible circle.
When testing this in IE 11, I found that when I had about 100 circles in the viewport, the rendering when dragging the mouse became extremely volatile. The profiler indicated that this was almost entirely due to the paint () procedure.
My code has already used requestAnimationFrame () from the library. Interestingly, while dragging the screen, I saw a slowdown; but if I only dragged the screen and let it out, letting the library code continue to animate the movement with slowdown, the repainting would be as smooth as butter. Slowing occurred only when dragging the mouse. The problem definitely seemed to be with mousemove. (Let's get back to this in a moment.)
I have reduced the paint () routine to nothing but a simple filled arc - the same problem. I tried to color the filled circle on the screen whenever I changed the zoom level, and then use drawImage () to copy the screen canvas to my main screen - this improved performance, but in IE it was still unstable. Then I tried to use this technique to draw all the circles on the front canvas of the same size as my main visible window, and then change paint () to do nothing but copy the splash screen onto my visible canvas - this again gave a small improvement, but not enough.
Then I tried to run the application in different browsers:
IE 11: very intermittent Firefox 42: very intermittent Chrome 47: ideal for all zoom levels Opera 34: ideal for all zoom levels Desktop Safari 5.1.7 (on PC): slightly variable at all zoom levels
The problem was definitely related to mousemove and how it is handled by different browsers.
In the end, I found this question in StackOverflow and its assumption that the mouse itself sends so many mousemove events that it hides the browserβs ability to redraw quickly enough. And I have a modern mouse with high speed event generation.
I tried adding a Throttle event checker to my mousemove and voila event handler! Success. Now my code smoothly displays in all browsers. (With pleasure.:))
I would like to add this additional information for those who may encounter the problem of paint () not working well in IE and Firefox when dragging with a high-frequency mouse. The proposed mousemove event throttling solution worked for me.