Doc = Base.extend({
	beans: true,

	initialize: function(canvas) {
		if (canvas) {
			this.canvas = canvas;
			this.ctx = this.canvas.getContext('2d');
			this.size = new Size(canvas.offsetWidth, canvas.offsetHeight);
		}
		Paper.documents.push(this);
		this.activate();
		this.layers = [];
		this.activeLayer = new Layer();
		this.currentStyle = null;
		this.symbols = [];
	},

	getCurrentStyle: function() {
		return this._currentStyle;
	},

	setCurrentStyle: function(style) {
		this._currentStyle = new PathStyle(this, style);
	},

	activate: function() {
		Paper.activateDocument(this);
	},

	redraw: function() {
		if (this.canvas) {
			// TODO: clearing the canvas by setting
			// this.canvas.width = this.canvas.width might be faster..
			this.ctx.clearRect(0, 0, this.size.width + 1, this.size.height);
			for (var i = 0, l = this.layers.length; i < l; i++) {
				this.layers[i].draw(this.ctx, {});
			}
		}
	}
});

@@ -643,106 +643,153 @@
 %09// 
-TODO: clearing the canvas by setting%0A%09%09%09// this.canvas.width = this.canvas.width might be faster..
+Initial tests conclude that clearing the canvas is always%0A%09%09%09// faster than using clearRect:%0A%09%09%09// http://jsperf.com/clearrect-vs-setting-width/7
 %0A%09%09%09
@@ -846,24 +846,28 @@
 .size.height
+ + 1
 );%0A%09%09%09for (v

Change comment about using canvas.width = canvas.width instead of context.clearRect.