Mottie/tablesorter

Sticky Headers "lags" when scrolling partially hidden table

Exinaus opened this issue · 8 comments

Hello.

I have a issue with sticky headers, when applying it to a very wide table, and the part of table are hidden with jQuery. I'm hidding part of table in this way: i apply special classes to every cell of a table, when creating table in php script. And then i use $('.some_class').hide(); to hide parts of a table.
Here you can see a example: http://gosselhos.p.ht/main.php#tabs-60

I assume, it's happens when widget try to clone a table, and then hide same parts of cloned table. Maybe is there a way to modify widget, and clone only visible part of table?

I'll need to dig a little deeper as to why there is a delay when the sticky headers snap to the top it shouldn't be doing that even with the 30+ tables on one page, with more being loaded by ajax...

As an aside, I'm getting a bit of a start up delay, but I think that's from hiding the 5600+ cells on initialization. Have you thought about breaking up the content a bit? The 2,200kb home page is a little too large for your users who want to look at your page on a tablet or phone.

Thank you, if you need anythig for that (like access to ftp), just say about it.

About other thing: there is a trouble with initial data, ~50-70mb for a large clan, plus data about past days, to build tables with progress stats.
When loading data via ajax on tab opening, you are quickly exhausting the limits of free hosting (they call it "processor time") - you need to load all initial data for every ajax tab, and we choose to load all the tables at one time, to stay in this limits.
Ofc we are trying to optimise all of this, but it's not an easy task to force an elephant fly like a butterfly.

I'll have a fix in the next update that will reduce that lag. I'm not sure when I'll have it all done, but I hope it will be some time this week, maybe on the weekend.

Hello again.

I updated tablesorter script to v2.9 (with that fix), but nothing changed. I still have lag, when sticky headers appears or dissapears.

I remove part of the tables on a page for faster load, and to reduce influence from other tables on that table if any, and other scripts applied to a table http://gosselhos.p.ht/main.php#tabs-60

I hope there is a way to fix it, if not, just tell me and I will stop bugging you about it.

Hi @Exinaus!

No way, I'm taking this seriously! :P

I've tried to copy your page and test it locally, but I'm having trouble getting the same table to show up, so I think it might be easier if I ask you to test this version instead.

https://dl.dropboxusercontent.com/u/1510510/tablesorter/js/jquery.tablesorter.widgets.js

If it doesn't change anything, I'll keep tweaking ;)

I uploaded version, result the same.

I copy the source of a page with js code that i use for this page on a site. And you can test it locally.
http://gosselhos.p.ht/sticky.zip

Alright, I think I have it all fixed... thanks for sharing your files!

Sadly, this update won't fix sticky header lag if the table has a lot of visible columns.

Thanks, everything works just perfect!