improved canvas performance