Index: /CKEditor/trunk/CHANGES.html
===================================================================
--- /CKEditor/trunk/CHANGES.html	(revision 7234)
+++ /CKEditor/trunk/CHANGES.html	(revision 7235)
@@ -75,4 +75,5 @@
 		<li><a href="http://dev.ckeditor.com/ticket/8232">#8232</a> : [IE] Unable to apply inline style that starts at the end of a link text.</li>
 		<li><a href="http://dev.ckeditor.com/ticket/7153">#7153</a> : Fail to load dev version of the editor after the window is loaded.</li>
+		<li><a href="http://dev.ckeditor.com/ticket/8246">#8246</a> : Bad editing performance on certain document content.</li>
 		<li>Updated the following language files:<ul>
 			<li><a href="http://dev.ckeditor.com/ticket/8128">#8128</a> : Italian;</li>
Index: /CKEditor/trunk/_source/core/dom/node.js
===================================================================
--- /CKEditor/trunk/_source/core/dom/node.js	(revision 7234)
+++ /CKEditor/trunk/_source/core/dom/node.js	(revision 7235)
@@ -655,10 +655,6 @@
 
 		/**
-		 * Checks if this node is read-only (should not be changed). Additionally
-		 * it returns the element that defines the read-only state of this node
-		 * (if present). It may be the node itself or any of its parent
-		 * nodes.
-		 * @returns {CKEDITOR.dom.element|Boolean} An element containing
-		 *		read-only attributes or "false" if none is found.
+		 * Checks if this node is read-only (should not be changed).
+		 * @returns {Boolean}
 		 * @since 3.5
 		 * @example
@@ -667,28 +663,20 @@
 		 *
 		 * // If "ele" is the above &lt;div&gt;
-		 * ele.isReadOnly();  // the &lt;div&gt; element
-		 *
-		 * // If "ele" is the above &lt;b&gt;
-		 * ele.isReadOnly();  // the &lt;div&gt; element
+		 * ele.isReadOnly();  // true
 		 */
 		isReadOnly : function()
 		{
-			var current = this;
-			while( current )
-			{
-				if ( current.type == CKEDITOR.NODE_ELEMENT )
-				{
-					if ( current.is( 'body' ) || !!current.data( 'cke-editable' ) )
-						break;
-
-					if ( current.getAttribute( 'contentEditable' ) == 'false' )
-						return current;
-					else if ( current.getAttribute( 'contentEditable' ) == 'true' )
-						break;
-				}
-				current = current.getParent();
-			}
-
-			return false;
+			var element = this;
+			if ( this.type != CKEDITOR.NODE_ELEMENT )
+				element = this.getParent();
+
+			if ( element
+					&& typeof element.$.isContentEditable != 'undefined'
+					&& !element.data( 'cke-editable' ) )
+			{
+				return !element.$.isContentEditable;
+			}
+			else
+				return false;
 		}
 	}
Index: /CKEditor/trunk/_source/plugins/selection/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/selection/plugin.js	(revision 7234)
+++ /CKEditor/trunk/_source/plugins/selection/plugin.js	(revision 7235)
@@ -962,4 +962,22 @@
 							continue;
 
+						// Range may start inside a non-editable element,
+						// replace the range start after it.
+						if ( range.startContainer.isReadOnly() )
+						{
+							var current = range.startContainer;
+							while( current )
+							{
+								if ( current.is( 'body' ) || !current.isReadOnly() )
+									break;
+
+								if ( current.type == CKEDITOR.NODE_ELEMENT
+										&& current.getAttribute( 'contentEditable' ) == 'false' )
+									range.setStartAfter( current );
+
+								current = current.getParent();
+							}
+						}
+
 						var startContainer = range.startContainer,
 							endContainer = range.endContainer,
@@ -967,10 +985,4 @@
 							endOffset = range.endOffset,
 							walkerRange = range.clone();
-
-						// Range may start inside a non-editable element, restart range
-						// by the end of it.
-						var readOnly;
-						if ( ( readOnly = startContainer.isReadOnly() ) )
-							range.setStartAfter( readOnly );
 
 						// Enlarge range start/end with text node to avoid walker
Index: /CKEditor/trunk/_source/plugins/wysiwygarea/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/wysiwygarea/plugin.js	(revision 7234)
+++ /CKEditor/trunk/_source/plugins/wysiwygarea/plugin.js	(revision 7235)
@@ -1241,7 +1241,10 @@
 					// We should flag that the element was locked by our code so
 					// it'll be editable by the editor functions (#6046).
-					if ( !element.isReadOnly() )
+					var readonly = element.getAttribute( 'contenteditable' ) == 'false';
+					if ( !readonly )
+					{
 						element.data( 'cke-editable', element.hasAttribute( 'contenteditable' ) ? 'true' : '1' );
-					element.setAttribute( 'contentEditable', false );
+						element.setAttribute( 'contenteditable', false );
+					}
 				}
 			});
