View Full Version : Performance Issue with chrome/canvas

07-22-2009, 06:35 PM
Hello, I am working on a panarama effect using canvas/excanvas. The script works perfectly in firefox, safari and IE (using excanvas) but is quite slow in chrome.

Essentially drawing code is:

update: function update() {
this.start = // start calculation
this.end = // end calculations

this._move = this.draw.delay(this._update, this); // delay then update again, using mootools

draw: function () {
this.canvas.drawImage(this.image, start,0, end-start, this.imageHeight);
// draw second image

Basically the effect is to scroll a wide image left or right when mousing over elements. I suspect that the issue may be from calling the drawing code too quickly but I have tried running it periodically (every x milliseconds) and running it as a delay (x milliseconds after returning from draw()). If anyone has any insight it would be very appreciated.