Thank you for your reply. I could do more on the server side, I'm guessing that python on the server will run faster than javascript in the browser.
Chaining the selectors was a very good tip, and does seem to speed things up a little bit. Is there any way to 'profile' the javascript as I try to optimize it, to find out where the slow bits are? I'll give the setTimeout method a shot. If that will let the page render before running the javascript, the delay won't be so bad. -CJL