<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -94,22 +94,28 @@ DomPredictionHelper.prototype.tokenizeCss = function(css_string) {
   var skip = false;
   var word = '';
   var tokens = [];
-//  if (css_string.substring(0,1) != ' ') css_string = &quot; &quot; + css_string;
-  jQuery.each(css_string.replace(/,/, ' , ').replace(/\s+/g, ' ').split(''), function() {
+  
+  var css_string = css_string.replace(/,/, ' , ').replace(/\s+/g, ' ');
+  var length = css_string.length;
+  var c = '';
+  
+  for (var i = 0; i &lt; length; i++){
+    c = css_string[i];
+    
     if (skip) {
       skip = false;
-    } else if (this == '\\') {
+    } else if (c == '\\') {
       skip = true;
-    } else if (this == '.' || this == ' ' || this == '#' || this == '&gt;' || this == ':' || this == ',') {
+    } else if (c == '.' || c == ' ' || c == '#' || c == '&gt;' || c == ':' || c == ',') {
       if (word.length &gt; 0) tokens.push(word);
       word = '';
     }
-    word += this;
-    if (this == ' ' || this == ',') {
+    word += c;
+    if (c == ' ' || c == ',') {
       tokens.push(word);
       word = '';
     }
-  });
+  }
   if (word.length &gt; 0) tokens.push(word);
   return tokens;
 };</diff>
      <filename>lib/dom.js</filename>
    </modified>
    <modified>
      <diff>@@ -53,8 +53,6 @@
   
   &lt;h2&gt;Results&lt;/h2&gt;
   &lt;p&gt;Milliseconds for 100 calls&lt;/p&gt;
-  &lt;dl id='results'&gt;
-    
-  &lt;/dl&gt;
+  &lt;dl id='results'&gt;&lt;/dl&gt;
 &lt;/body&gt;
 &lt;/html&gt;</diff>
      <filename>sites/test/testCSSTokenizing.html</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>908786de23debbfaf4670adc91e8bef6730fbb3c</id>
    </parent>
  </parents>
  <author>
    <name>Adam Sanderson</name>
    <email>netghost@gmail.com</email>
  </author>
  <url>http://github.com/iterationlabs/selectorgadget/commit/ace04798cac57957ca1e5b7ed1e4c9182828f312</url>
  <id>ace04798cac57957ca1e5b7ed1e4c9182828f312</id>
  <committed-date>2009-04-11T19:45:51-07:00</committed-date>
  <authored-date>2009-04-11T19:10:09-07:00</authored-date>
  <message>Speed up tokenizeCss.

Use a for loop instead of jQuery.each, on longer strings you get around a 5x improvement.
(cherry picked from commit 773a33b38035cdae720b5dca7c1705b6f190560f)</message>
  <tree>095e76ff6306a1fd2b849b6c3fab72e17708377b</tree>
  <committer>
    <name>Adam Sanderson</name>
    <email>netghost@gmail.com</email>
  </committer>
</commit>
