Announcement

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

    fetchDelay on grids seems to be ignored

    Hi guys,

    SmartClient is the best open source enterprise RIA out there - well done.
    I've recently upgraded to use SC 11.

    In SmartClient_v110p_2016-04-21_LGPL, I note that when drag scrolling (with the scrollbar thumb) in a paged list grid, a lot of and perhaps excessive server requests are made (using a rest data source in paged mode).
    After doing a little bit of poking I tried setting fetchDelay on dataProperties like so..

    dataProperties: {
    fetchDelay: 100, // need to delay and queue up fetches when using the scroll bar handle
    }
    within my listgrid constructor.

    This didn't work.
    I also noticed that fetchDelay was always 1 by the time ResultSet.getRange() was called via

    dataProperties: {
    fetchDelay: 100, // need to delay and queue up fetches when using the scroll bar handle
    getRange : function (start, end, ignoreCache, fetchNow) {
    console.log(start + ' : ' + end + " : " + ignoreCache + " : " + fetchNow + " : " + this.fetchDelay);
    return this.Super('getRange', arguments);
    },

    which gave me a tonne of output like

    0 : 51 : undefined : undefined : 1

    So I ended up setting fetch delay before my call to this.Super('getRange', arguments); and this had the desired effect.

    Perhaps a bug?
    Was there a deliberate change from SC 10.1 to SC 11 in the delay?

    Thanks in advance,
    Mike.

    #2
    SmartClient 11.0/SmartGWT 6.0 we've enabled more aggressive redraw and data fetching timings in order to reduce user-perceived lag. Modern browsers and most server configurations can generally handle this, but if desired you can revert to the older behavior by setting this before loading SmartClient on your page:

    Code:
    <script>var isc_useHighPerformanceGridTimings=false;</script>
    This flag (which you can use with your build but whic will be documented in the next nightly stable build) controls the defaults of several component attributes, including ListGrid.dataFetchDelay (also previously undocumented, but used to initialize ResultSet.fetchDelay - which is why your setting is being overridden).

    Comment


      #3
      Thanks guys. This worked a treat and allowed me to remove my hacky code workaround.

      Comment


        #4
        I am using SmartClient Version: v11.0p_2017-02-11/PowerEdition Deployment (built 2017-02-11).
        I have setKeyPressFilter to true in my grid and setFetchDelay. Even set the property var isc_useHighPerformanceGridTimings=false; in my html. Still the delay is not working. Any help?

        Comment


          #5
          Yes, update to a newer build - this was fixed on April 4. You should always test issues against the latest build.

          Comment


            #6
            April 4th 2016 or 2017?

            Comment


              #7
              2017...

              Comment


                #8
                Thanks. I will update to latest version.

                Comment

                Working...
                X