ericdrowell / KineticJS

KineticJS is an HTML5 Canvas JavaScript framework that extends the 2d context by enabling canvas interactivity for desktop and mobile applications.
http://www.kineticjs.com
3.98k stars 752 forks source link

Slow when zooming / panning on a canvas with lots of text #1010

Open josephernest opened 10 years ago

josephernest commented 10 years ago

I add 1000 elements of text on a big canvas with KineticJS, which supports :

panning (north/south/west/east) [with click + drag]
zooming [with mousewheel]

Demo here : http://s419743653.onlinehome.fr/things/kinetic_zooming.html

It works, but it is very slow when we scroll, at least on Firefox (I have a laptop with no real GPU) (but not on Chrome).

How to speed up the rendering (when we scroll or zoom) ? What kind of optimization should be done?