Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Progressive Loading multiple fetches

    Hi,

    I cannot set up proper config values for progressive loading.
    Now I got back to defaults.

    Server is returning totalRows = endRow + 20.
    I've found that this should be default but tried other values with no luck.
    Grid is displaying no more than 20.

    So in first request server provides 75 records and total rows = 95.
    Immediately after that client calls for another part and another...
    What are the correct options to prevent this calls to happen.
    Tried setting up drawAhead and other options with no luck.

    Code:
    18:08:56.799:INFO:ResultSet:isc_ResultSet_1 (dataSource: dsActivity, created by: isc_ListGrid_4):setCriteria: filter criteria changed, invalidating cache
    18:08:56.800:INFO:ResultSet:isc_ResultSet_1 (dataSource: dsActivity, created by: isc_ListGrid_4):Invalidating cache
    18:08:56.805:INFO:ResultSet:isc_ResultSet_1 (dataSource: dsActivity, created by: isc_ListGrid_4):getRange(0, 39) will fetch from 0 to 75
    18:08:56.806:INFO:ResultSet:isc_ResultSet_1 (dataSource: dsActivity, created by: isc_ListGrid_4):fetching rows 0,75 from server
    18:08:57.208:XRP7:INFO:ResultSet:isc_ResultSet_1 (dataSource: dsActivity, created by: isc_ListGrid_4):Received 75 records from server
    18:08:57.209:XRP7:INFO:ResultSet:isc_ResultSet_1 (dataSource: dsActivity, created by: isc_ListGrid_4):cached 75 rows, from 0 to 75 (95 total rows, 75 cached)
    18:08:57.271:TMR1:INFO:ResultSet:isc_ResultSet_1 (dataSource: dsActivity, created by: isc_ListGrid_4):getRange(0, 95) will fetch from 75 to 150
    18:08:57.575:TMR6:INFO:ResultSet:isc_ResultSet_1 (dataSource: dsActivity, created by: isc_ListGrid_4):fetching rows 75,150 from server
    18:08:57.699:XRP9:INFO:ResultSet:isc_ResultSet_1 (dataSource: dsActivity, created by: isc_ListGrid_4):Received 75 records from server
    18:08:57.700:XRP9:INFO:ResultSet:isc_ResultSet_1 (dataSource: dsActivity, created by: isc_ListGrid_4):cached 75 rows, from 75 to 150 (170 total rows, 150 cached)
    18:08:57.706:TMR0:INFO:ResultSet:isc_ResultSet_1 (dataSource: dsActivity, created by: isc_ListGrid_4):getRange(0, 170) will fetch from 150 to 225
    18:08:58.014:TMR1:INFO:ResultSet:isc_ResultSet_1 (dataSource: dsActivity, created by: isc_ListGrid_4):fetching rows 150,225 from server
    18:08:58.160:XRP0:INFO:ResultSet:isc_ResultSet_1 (dataSource: dsActivity, created by: isc_ListGrid_4):Received 75 records from server
    18:08:58.161:XRP0:INFO:ResultSet:isc_ResultSet_1 (dataSource: dsActivity, created by: isc_ListGrid_4):cached 75 rows, from 150 to 225 (245 total rows, 225 cached)
    18:08:58.184:TMR4:INFO:ResultSet:isc_ResultSet_1 (dataSource: dsActivity, created by: isc_ListGrid_4):getRange(0, 245) will fetch from 225 to 300
    18:08:58.557:TMR3:INFO:ResultSet:isc_ResultSet_1 (dataSource: dsActivity, created by: isc_ListGrid_4):fetching rows 225,300 from server
    18:08:58.699:XRP1:INFO:ResultSet:isc_ResultSet_1 (dataSource: dsActivity, created by: isc_ListGrid_4):Received 75 records from server
    18:08:58.700:XRP1:INFO:ResultSet:isc_ResultSet_1 (dataSource: dsActivity, created by: isc_ListGrid_4):cached 75 rows, from 225 to 300 (320 total rows, 300 cached)
    I'm using SmartGWT 5.0p 2015-01-20 with GWT 2.7.0
    Tested in Super Dev Mode and after full compilation on Chrome and Firefox with same results.

    Best regards
    Mariusz Goch

    #2
    I've found something strange and I don't know if this is intended or not.
    Number of initial fetches depends on how many fields ListGrid displays.
    Previous log was for only one field - 4 fetches 300 records cached

    2 fields -> 2 fetches 150 records cached
    3 fields -> 1 fetch 75 records cached

    And that's for setting up server to return +20 in totalRows.
    When I set +1 than for 3 fields -> 2 fetches.

    I believe there is algorithm that forecasts required memory and adjust fetches.
    But what parameters controls it and how to disable it??

    It's also strange that it calculates fields that are currently displayed in ListGrid and not all fields that are in DataSource and which are actually transferred.

    Best regards
    Mariusz Goch

    Comment


      #3
      Hi,

      I don't know if this is connected to original problem(still unresolved) but I found another problem with progressive loading.
      I've setup server to return +1 on totalRows (when they are of course).

      Setting bigger value caused problems on scrolling near the end of data:
      Scrolling far beyond (50 records) data caused rendering grid, fetch send with totalRows lower than previously given and those rendered grid lines stays unfilled.
      Only method to make ListGrid operational when this happened was to invalidateCache.

      Sometimes when you scroll back and forth ListGrid fetch data that was already fetched that causes setting total rows lower. But when you scroll down fetch is not triggered because those records were already in cache. So user cannot scroll lower no matter how many records are there.
      For example:

      Code:
      17:01:27.789:MUP4:INFO:ResultSet:isc_ResultSet_1 (dataSource: dsActivity, created by: isc_ListGrid_4):Invalidating cache
      17:01:27.824:TMR6:INFO:ResultSet:isc_ResultSet_1 (dataSource: dsActivity, created by: isc_ListGrid_4):getRange(562, 600) will fetch from 543 to 618
      17:01:27.849:TMR6:INFO:ResultSet:isc_ResultSet_1 (dataSource: dsActivity, created by: isc_ListGrid_4):getRange(553, 591) will fetch from 534 to 609
      17:01:28.190:TMR2:INFO:ResultSet:isc_ResultSet_1 (dataSource: dsActivity, created by: isc_ListGrid_4):fetching rows 534,609 from server
      17:01:28.303:XRP4:INFO:ResultSet:isc_ResultSet_1 (dataSource: dsActivity, created by: isc_ListGrid_4):Received 74 records from server
      17:01:28.305:XRP4:INFO:ResultSet:isc_ResultSet_1 (dataSource: dsActivity, created by: isc_ListGrid_4):cached 74 rows, from 535 to 609 (610 total rows, 74 cached)
      17:01:37.410:TMR5:INFO:ResultSet:isc_ResultSet_1 (dataSource: dsActivity, created by: isc_ListGrid_4):getRange(449, 487) will fetch from 430 to 505
      17:01:37.714:TMR1:INFO:ResultSet:isc_ResultSet_1 (dataSource: dsActivity, created by: isc_ListGrid_4):fetching rows 430,505 from server
      17:01:37.867:XRP7:INFO:ResultSet:isc_ResultSet_1 (dataSource: dsActivity, created by: isc_ListGrid_4):Received 74 records from server
      17:01:37.868:XRP7:INFO:ResultSet:isc_ResultSet_1 (dataSource: dsActivity, created by: isc_ListGrid_4):cached 74 rows, from 431 to 505 (506 total rows, 148 cached)
      17:01:39.782:TMR4:INFO:ResultSet:isc_ResultSet_1 (dataSource: dsActivity, created by: isc_ListGrid_4):getRange(477, 506) will fetch from 505 to 580
      17:01:40.084:TMR3:INFO:ResultSet:isc_ResultSet_1 (dataSource: dsActivity, created by: isc_ListGrid_4):fetching rows 505,580 from server
      17:01:40.198:XRP9:INFO:ResultSet:isc_ResultSet_1 (dataSource: dsActivity, created by: isc_ListGrid_4):Received 74 records from server
      17:01:40.199:XRP9:INFO:ResultSet:isc_ResultSet_1 (dataSource: dsActivity, created by: isc_ListGrid_4):cached 74 rows, from 506 to 580 (581 total rows, 222 cached)
      17:01:42.956:TMR6:INFO:ResultSet:isc_ResultSet_1 (dataSource: dsActivity, created by: isc_ListGrid_4):getRange(552, 581) will fetch from 580 to 655
      17:01:43.260:TMR0:INFO:ResultSet:isc_ResultSet_1 (dataSource: dsActivity, created by: isc_ListGrid_4):fetching rows 580,655 from server
      17:01:43.399:XRP1:INFO:ResultSet:isc_ResultSet_1 (dataSource: dsActivity, created by: isc_ListGrid_4):Received 74 records from server
      17:01:43.400:XRP1:INFO:ResultSet:isc_ResultSet_1 (dataSource: dsActivity, created by: isc_ListGrid_4):cached 74 rows, from 581 to 655 (656 total rows, 296 cached)
      17:01:44.845:TMR9:INFO:ResultSet:isc_ResultSet_1 (dataSource: dsActivity, created by: isc_ListGrid_4):getRange(330, 331) will fetch from 293 to 367
      17:01:44.848:TMR9:INFO:ResultSet:isc_ResultSet_1 (dataSource: dsActivity, created by: isc_ListGrid_4):getRange(314, 352) will fetch from 295 to 370
      17:01:45.150:TMR5:INFO:ResultSet:isc_ResultSet_1 (dataSource: dsActivity, created by: isc_ListGrid_4):fetching rows 295,370 from server
      17:01:45.261:XRP6:INFO:ResultSet:isc_ResultSet_1 (dataSource: dsActivity, created by: isc_ListGrid_4):Received 74 records from server
      17:01:45.262:XRP6:INFO:ResultSet:isc_ResultSet_1 (dataSource: dsActivity, created by: isc_ListGrid_4):cached 74 rows, from 296 to 370 (371 total rows, 370 cached)
      17:01:47.768:TMR6:INFO:ResultSet:isc_ResultSet_1 (dataSource: dsActivity, created by: isc_ListGrid_4):getRange(278, 316) will fetch from 221 to 296
      17:01:48.072:TMR0:INFO:ResultSet:isc_ResultSet_1 (dataSource: dsActivity, created by: isc_ListGrid_4):fetching rows 221,296 from server
      17:01:48.188:XRP1:INFO:ResultSet:isc_ResultSet_1 (dataSource: dsActivity, created by: isc_ListGrid_4):Received 74 records from server
      17:01:48.190:XRP1:INFO:ResultSet:isc_ResultSet_1 (dataSource: dsActivity, created by: isc_ListGrid_4):cached 74 rows, from 222 to 296 (297 total rows, 371 cached)
      Is there a way to prevent those middle fetches from happening??
      Or maybe a way to invalidate part of cache that is larger then last endRow so that another fetch would be triggered??
      Full invalidateCache would scroll all the way back causing even more problems.

      Best regards
      Mariusz Goch

      Comment


        #4
        One more example.
        ListGrid saves position of scroll between refreshes of whole page.
        It's very cool and practical solution but with progressive loading it also fails.
        This is what happens:

        cached 74 rows, from 76 to 150 (151 total rows, 149 cached)
        getRange(50, 87) will fetch from 38 to 112

        As before user cannot scroll beyond this area.

        Code:
        17:59:00.371:INFO:ResultSet:isc_ResultSet_2 (dataSource: dsActivity, created by: isc_ListGrid_4):Invalidating cache
        17:59:00.376:INFO:ResultSet:isc_ResultSet_2 (dataSource: dsActivity, created by: isc_ListGrid_4):getRange(0, 39) will fetch from 0 to 75
        17:59:00.376:INFO:ResultSet:isc_ResultSet_2 (dataSource: dsActivity, created by: isc_ListGrid_4):fetching rows 0,75 from server
        17:59:00.838:XRP5:INFO:ResultSet:isc_ResultSet_0 (dataSource: isc_DSLucidUsersInfo_0, created by: (cacheAllData fetch)):Received 9 records from server
        17:59:00.885:XRP6:INFO:ResultSet:isc_ResultSet_2 (dataSource: dsActivity, created by: isc_ListGrid_4):Received 75 records from server
        17:59:00.886:XRP6:INFO:ResultSet:isc_ResultSet_2 (dataSource: dsActivity, created by: isc_ListGrid_4):cached 75 rows, from 0 to 75 (76 total rows, 75 cached)
        17:59:00.942:TMR0:INFO:ResultSet:isc_ResultSet_2 (dataSource: dsActivity, created by: isc_ListGrid_4):getRange(0, 76) will fetch from 75 to 150
        17:59:01.288:TMR1:INFO:ResultSet:isc_ResultSet_2 (dataSource: dsActivity, created by: isc_ListGrid_4):fetching rows 75,150 from server
        17:59:01.551:XRP7:INFO:ResultSet:isc_ResultSet_2 (dataSource: dsActivity, created by: isc_ListGrid_4):Received 74 records from server
        17:59:01.551:XRP7:INFO:ResultSet:isc_ResultSet_2 (dataSource: dsActivity, created by: isc_ListGrid_4):cached 74 rows, from 76 to 150 (151 total rows, 149 cached)
        17:59:01.636:TMR8:INFO:ResultSet:isc_ResultSet_2 (dataSource: dsActivity, created by: isc_ListGrid_4):getRange(50, 87) will fetch from 38 to 112
        17:59:01.937:TMR1:INFO:ResultSet:isc_ResultSet_2 (dataSource: dsActivity, created by: isc_ListGrid_4):fetching rows 38,112 from server
        17:59:02.168:XRP2:INFO:ResultSet:isc_ResultSet_2 (dataSource: dsActivity, created by: isc_ListGrid_4):Received 73 records from server
        Has anyone use progressive loading in production??
        There must be some settings that make this feature usable.

        Best regards
        Mariusz Goch

        Comment

        Working...
        X