If I have in the page unnecessary ids on elements, like the HTML Helper does in ASP.Net-MVC.
Does it reduce the performace of my id selectors? (I have a page with enormous amout of elements)
Example:
// First DOM
<HTML>
...
<input type="text" value="first" id="useless" />
<input type="text" value="second" id="useful" />
</HTML>
// Second DOM
<HTML>
...
<input type="text" value="first"/>
<input type="text" value="second" id="useful" />
</HTML>
Script:
<script>
alert($('#useful').val());
// never select the first element (with the useless id)
</script>
Short answer, no.
http://www.stevesouders.com/blog/2009/03/10/performance-impact-of-css-selectors/