@Tony ahh nice, forgot about the while loop ๐
I gave it a go (won't bore you with the numbers) but it didn't seem to improve performance noticeably. It did however reduce number of calls further so it's going in, at least for me.
@OlegK good catch on $($t.rows) and the “3” in my post is actually a typo, should've been “13” columns.
Regarding each/for, I agree that the performance improvements are minimal but I prefer them for reduction in the number of calls made – less calls, less chances for something to go wrong ๐
Now, that “trick” with calling show/hideCol once each is a nice one. I gave it a try and it seemed to have only marginally improved performance, to be fair though, pretty much all results starting with 3 (from my previous post) have fallen within margin of error so in terms of pure ms your original modification is still the only clear and definite improvement.
Having said that, with all the conseqent improvements the number of calls have been reduced from 4453 to 442, which consitutes a 10 fold decrease, so it's all worth while in my opinion. ๐
BTW, quick question, why did you add “parseInt” in your code?
Anyway, it's now time to tackle setGridWidth as that's the new bottleneck in my code.