Scroller broken for huge Ajax data sets on FF and IE

Scroller broken for huge Ajax data sets on FF and IE

jan_goyvaertsjan_goyvaerts Posts: 31Questions: 0Answers: 0
edited June 2013 in Bug reports
The vertical scrollbar behaves differently when doing server-side Ajax on FireFox 21 and IE. Instead of scrolling for the whole dataset it only scrolls the page. There are no visible JS errors.

It does work with Chrome 27 however.

After many attempts to reproduce the online demo (http://www.datatables.net/release-datatables/extras/Scroller/server-side_processing.html) I finally reduced the total amount of data in the response from 1,000,000 to 10,000; as for the demo. From then on the vertical scrollbar does work for FireFox and IE too. 500,000 seems to be okay. But 750,000 breaks the behavior also.

To reproduce this error I think you just have to increase the values of iTotalRecords and iTotalDisplayRecords in the response to 1,000,000.

Replies

  • jan_goyvaertsjan_goyvaerts Posts: 31Questions: 0Answers: 0
    500,000 works for IE8, but not for IE9 and IE10. Reducing to 100,000 fixes it.

    But then again, what does one do when there really are 500K rows ? :-)
  • jan_goyvaertsjan_goyvaerts Posts: 31Questions: 0Answers: 0
    An update for IE8/9/10: The cursor of the scrollbar is misaligned - when it is at the bottom the dataset shown is roughly halfway; +/- 50K instead of the full 100K rows.

    Chrome and Firefox have no such problem.
  • jan_goyvaertsjan_goyvaerts Posts: 31Questions: 0Answers: 0
    Can it be related to the way large numbers are formatted in JS ? For 1M rows of 30px each, the "force" div has a different height; depending on the browser.

    Chrome 27 (Works)


    Firefox 21 (Doesn't scroll the wrt the total data set)


    IE10 (Doesn't scroll the wrt the total data set)


    Firefox puts the height into scientific notation while IE is 8.6M short.
  • jan_goyvaertsjan_goyvaerts Posts: 31Questions: 0Answers: 0
    It seems IE won't allow CSS properties go higher than 21474836.47...

    Therefor, as it is now Scroller can be used with IE to show big data sets. I could make it work to 50K. With 100K I can't scroll lower than 51K. :-)
  • allanallan Posts: 56,444Questions: 1Answers: 8,957 Site admin
    Thanks very much for posting your question and debugging information. I hadn't come across the problem before - how annoying!

    It looks like 33554400px is the max in Chrome and Firefox ( http://stackoverflow.com/questions/16637530 ), so a little better than IE, but not much.

    This might be resolvable by spliting the forcing element into multiple individual elements if the height to be displays is greater than a certain size.

    I'll need to take a look a bit further at it.

    Regards,
    Allan
  • jan_goyvaertsjan_goyvaerts Posts: 31Questions: 0Answers: 0
    Thank you for looking to it :-)

    I'm in a bit of problem explaining to newbees why the wonderful scrolling feature is working differently. Too long those technical emails !!! :-p
  • jan_goyvaertsjan_goyvaerts Posts: 31Questions: 0Answers: 0
    Chrome shows a maximum of about 1.1M rows.
  • allanallan Posts: 56,444Questions: 1Answers: 8,957 Site admin
    I suspect that will bee needed to is scale the viewport. So when you scroll through the list with the scrollbar it will jump to a certain point - i.e. there isn't going to be a 1:1 correlation between position and rows shown - the correlation will need to be calculated. Hopefully it shouldn't be too difficult to implement, although I've got it on the back burner until 1.10 is in beta, as that's already behind where it should be!

    Allan
  • jan_goyvaertsjan_goyvaerts Posts: 31Questions: 0Answers: 0
    No worries - 50K will do. For the time being ! :-p
This discussion has been closed.