Scroller trace output

Scroller trace output

tommcktommck Posts: 73Questions: 0Answers: 0
edited July 2011 in Plug-ins
Why, when I enable tracing (trace: true) on the scroller, does the output always say "with rows 0 to 0 rendered by the DataTable" ?

For example:
[code]
Scroll: 1163px - boundaries: -287.5 / -143.5. Showing rows 19 to 28 in the viewport, with rows 0 to 0 rendered by the DataTable
[/code]

What does that mean? Is there something wrong with my setup? It's supposed to be using the "_iDisplayStart" and "_iDisplayEnd" variables and I would have expected them to be populated, no?

Replies

  • tommcktommck Posts: 73Questions: 0Answers: 0
    While I'm on the topic, why is it re-requesting data it already has?

    ScrollTest: Requested Start: 0 Length: 72
    ScrollTest: Requested Start: 45 Length: 72
    ScrollTest: Requested Start: 81 Length: 72
    ScrollTest: Requested Start: 134 Length: 72

    It keeps re-requesting 1/2 a "page" of data...
  • tommcktommck Posts: 73Questions: 0Answers: 0
    Actually, if I just click the scroll down button repeatedly, it requests even more than that...

    ScrollTest: Requested Start: 0 Length: 72
    ScrollTest: Requested Start: 16 Length: 72
    ScrollTest: Requested Start: 48 Length: 72
    ScrollTest: Requested Start: 66 Length: 72
    ScrollTest: Requested Start: 68 Length: 72
    ScrollTest: Requested Start: 86 Length: 72
    ScrollTest: Requested Start: 88 Length: 72
    ScrollTest: Requested Start: 104 Length: 72
    ScrollTest: Requested Start: 106 Length: 72
    ScrollTest: Requested Start: 134 Length: 72
    ScrollTest: Requested Start: 136 Length: 72

    That's hugely redundant and chatty!
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    You might want to read this post about how Scroller operates, particularly the part with the image showing how the overlaps work: http://datatables.net/blog/Introducing_Scroller_-_Virtual_Scrolling_for_DataTables .

    And yes the trace output is chatty, but that's a good thing imho - trace output should be about getting information for what Scroller is doing. If you don't want the trace, disable it.

    > with rows 0 to 0 rendered by the DataTable

    Not sure why it is doing that. It will happen on the first load if you are using server-side processing since there are no rows, and the trace message is right at that point. However if you see it more than that, perhaps you can post a link to your demo.

    Allan
  • tommcktommck Posts: 73Questions: 0Answers: 0
    it happens on every row on a simple example... I"ll try to post it in a bit.. fixing some production probs right now
  • tommcktommck Posts: 73Questions: 0Answers: 0
    It's not the Trace output that's the "chatty" part.. I mean it's retrieving tons of data that it already has! In the following requests, it's re-requesting 70 records it just retrieved a second ago.

    ScrollTest: Requested Start: 134 Length: 72
    ScrollTest: Requested Start: 136 Length: 72
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    It should only be requesting new data when you see "Table redraw." in the console - which appears to be working sensibly with my local copy here. Can you link to your demo? Is Firebug (etc) showing a huge number of XHRs going out (assuming you are using server-side processing)?

    Allan
  • tommcktommck Posts: 73Questions: 0Answers: 0
    It's definitely hitting the server (those messages are coming from the server).

    I'm deploying the site again... Send you an email to give you details...
  • tommcktommck Posts: 73Questions: 0Answers: 0
    By the way, if you play with that scroller enough, it actually doesn't redraw the screen sometimes. I'm not sure what's going on there, but it's kind of a problem :)
  • tommcktommck Posts: 73Questions: 0Answers: 0
    oh, also, if you have an iPad (only ipad will work), this will use iScroll-based swiping, but it still has some display issues as well.
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Thanks for the link - it actually looks like it is working as expected for me though (Chrome / Firefox - no IE access atm). It makes an XHR whenever "Retrieving Test Data" shows up in the console, which isn't very often and only when the scrolling stops. Perhaps I am missing something?

    Allan
  • tommcktommck Posts: 73Questions: 0Answers: 0
    If you only scroll one row, it requests almost all the data it already has... why isn't it just requesting new records?

    like the example above...

    ScrollTest: Requested Start: 134 Length: 72
    ScrollTest: Requested Start: 136 Length: 72

    I scrolled 2 rows. Why is it re-requesting data at all? And, if it is, why isn't it just requesting 206-208?

    I would assume that it would wait until I got close to a "trigger" point, then requested the _next_ page of data, not the same stuff it already has.
  • tommcktommck Posts: 73Questions: 0Answers: 0
    FYI: I sent you my new plugin script so you could see how it works for you... You'll have to grab some sort of touch device to try it out. I've only tested it on the iPad at this point.

    Tom
This discussion has been closed.