Announcement

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

    CubeGrid refresh issue.

    Hi Guys,

    I post a new thread about incorrect cubegrid refresh behavior.
    I already posted a thread about this but I was unable to reproduce a case in standalone. Now I understood exactly what the problem is and I'm looking for a fix.
    My customer and myself still have a support contract with you and if you need more info you can just ask me.

    We are using :
    1. SmartClient Version: v9.1p_2014-12-05/PowerEdition Deployment (built 2014-12-05)
    2. Chrome Version 44.0.2403.157 m

    The test case is easy :
    1) Open a new cube grid with and empty datasource (no record at all)
    2) Do an update (or a mass update to let time growth) (~11s)
    <classic_update.jpg>
    3) Save it (saveAllEdits). (~11s)
    <classic_save.jpg>

    What happen :
    Every update operation without record generate a whole grid refresh.
    The save is also refreshing the whole grid for EVERY updated cell.

    After that you can :
    1) Update the previously saved values (~0.05s)
    2) Save it (saveAllEdits) (~0.2s)

    What happen when a record exist :
    Every update are now really fast.
    The save is also really fast.


    What I've done right now is debugging the JS to get exactly what happen and I could find a part of the fix.

    The updateEditValueNoRedraw method which do the update job but without the automatic refresh.
    Code:
        public native void setEditValueNoRedraw(int row, int col, String value) /*-{
            var self = this.@com.smartgwt.client.widgets.BaseWidget::getOrCreateJsObj()();
            self.setEditValue(row, col, value, true);
         }-*/;
    BUT for the save method I couldn't do anything as the code is encapsulated and was not reachable simply.

    The test case with the custom method (NoRedraw) :
    1) Open a new cube grid with and empty datasource (no record at all)
    2) Do an update (or a mass update to let time growth) (~1.2s)
    <fast_update.jpg>
    3) Save it (saveAllEdits). (~11s)
    <fast_save.jpg>

    The save is still so long as the "add" operation call a full redraw of the grid for each updated cell.

    You can see the debug point on the redraw method <add_oper_ds.jpg>
    Which doesn't occurs when the operation is "update", a record already exists.

    The test code is available here : <gdrive link removed see 3rd answer>

    Thx for your help !
    Attached Files
    Last edited by Emilien; 3 Sep 2015, 01:12.

    #2
    Originally posted by Emilien View Post
    The test case is easy :
    1) Open a new cube grid with and empty datasource (no record at all)
    2) Do an update (or a mass update to let time growth) (~11s)
    <classic_update.jpg>
    3) Save it (saveAllEdits). (~11s)
    <classic_save.jpg>
    Can you clarify what you mean in the above steps 1-2? Are you starting with an empty CubeGrid and empty DataSource, and then making a bunch of DataSource addData() calls on the CubeGrid? (An "update" means that an existing record is modified, so it's not clear how that would work in your description.)

    Perhaps you can describe what APIs you're calling?

    For your repro case, you can't link to Google Drive. You'll need to attach the files or add the code inlined - this is to purposely limit the code to a reasonable size. You can read an overview of how a repro case should be created here: http://www.smartclient.com/smartgwt/...Debugging.html under the section titled "Preparing a standalone test case".

    Comment


      #3
      Hi,

      The problem is not the size of the sources, but the number of attachment limited to 5 :)

      I removed the maximum of unused things from my previous zip : HeliosSandbox.txt (in attachment), you have to rename it as HeliosSandbox.zip, it contains a very simple test case directly runnable with only 6 class (3 are still useless) : CustomCubeGrid.java (the cubegrid with custom method), HeliosWeb.java (entry point), MyDS.java (the empty datasource), the pom and gwt config file.

      To answer your question, the initial case if an empty cube grid (no edit, no record, only facet) AND an empty data source (no record at all)

      The API called to update the cube in loop on selected cells is : setEditValue(row, col, value).

      To save all the only entry point saveAllEdits(function), same behavior, each cell trigger an add to the datasource that fully refresh the cube.
      Attached Files
      Last edited by Emilien; 3 Sep 2015, 01:17.

      Comment


        #4
        We're able to reproduce the problem and are looking into it. Note, however, that you're not supposed to rename a zip and attach it as a txt, for similar reasons as the other restriction. We want small, concise samples.

        Comment


          #5
          We've applied a fix that should dramatically speed up the calls to setEditValue() and saveAllEdits() in the case where the CubeGrid has no current records.&#194;&#160; SGWT 5.0p and newer will be fixed.&#194;&#160; Check the nightly builds dated 2015-09-15.
          Last edited by Isomorphic; 14 Sep 2015, 13:31.

          Comment


            #6
            Ok thx a lot, I will test the fix with the nightly build.

            Is there a way to get the fix on the version of smart we are using ? (SmartClient Version: v9.1p_2014-12-05/PowerEdition Deployment (built 2014-12-05))

            Regards.
            Last edited by Emilien; 21 Sep 2015, 01:53.

            Comment


              #7
              No, we do not release individual patches as this causes the number of possible test configurations to grow exponentially.

              Comment


                #8
                The fix has been ported back to SGWT 4.1p, and will be available in the nightly build stamped 2015-09-22.

                Comment

                Working...
                X