I got a problem in drawing on canvas. the problem is that when some event fire, the 'requestAnimFrame' is slow.
You can see a time between current drawing and next drawing.
just type a little bit long text on any textbox. you will see an high gap time when you type.
when you type on textbox in fsfiddle, it check the color of text.
it take a little bit time.for example, type 'v' or 'var', in my case, the gap time change 16 to 58. or select source code by dragging, it take a time. the reason might be the access of DOM or some screen changed.
but that would be not all, i am making a game with socket.io .when game receive a socekt, the gap time is 100ms or more. but the socket function just takes 10ms or 20ms.
it is critical issue in a game programming.
is there anyway to solve it?
the
requestAnimFrame
isn't slow - it's your calculations that are slow look here:http://jsfiddle.net/FwynN/