Michael Mahemoff runs into a problem with Protypes $$ function when looking for class names. Its taking over 90 seconds when more than 100 matches are returned. The advice is: Avoid $$(".classname") on large DOMs.
Stuart Langridge provides unobtrusive JavaScript that makes HTML tables sortable by their table headers. To enhance a table to be sortable requires the addition of the classname sorttable