jquery selector slow when 1000+ elements with 450Mhz machine
<p>I got something like this which contains about 1000 dom elements</p>

<pre><code>  &lt;table id="tableId"&gt;
    &lt;tr class="selected"&gt;&lt;td&gt;Text 1&lt;/td&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;td&gt;Text 2&lt;/td&gt;&lt;/tr&gt;
    ...
    &lt;tr&gt;&lt;td&gt;Text 500&lt;/td&gt;&lt;/tr&gt;
  &lt;/table&gt;
</code></pre>

<p>problem is that i need to do something like this:<br /></p>

<pre><code>y = new selected tr;
$("#tableId").find("tr").removeClass("selected").eq(y).addClass("selected");
</code></pre>

<p>The problem here is the selector itself who takes about 600ms to process which is kinda too long for the things we are doing.</p>

<p>The machine im using uses a browser <strong>opera10</strong> and has only <strong>450Mhz</strong> running on linux!<br/>
Do you guys think that the problem comes from the machine being that slow? </p>

<p>Is there a way to improve the selector ?</p>
