Announcement

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

    Performance issue with multi-select picklist and large value map

    Hi Isomorphic,

    I'm experiencing a very long delay when trying to open the picklist of a multi-select item when the value map contains few thousand entries and all items are selected.
    I am wondering whether there is something you can improve or am I doing something wrong?

    Here is a simple code snippet to illustrate the problem:
    Code:
    var form = isc.DynamicForm.create({
      ID:"exampleForm",
      width:450,
      wrapItemTitles: false,
      fields: [
        {
          type:"select",
          multiple:true
        },
      ]
    });
    
    
    var bigValueMap = {};
    var value = [];
    for (var i=1; i<2000; i++) {
      bigValueMap[i] = "option #" + i;
      value.add(i);
    };
    form.getField(0).setValueMap(bigValueMap);
    form.getField(0).setValue(value);
    Just run this code and try to open the pick-list, you will notice it takes 5+ seconds to open.

    Seen with the latest SC build: v12.1p_2021-05-22

    #2
    Hi Gedri
    Thanks for the clear test case.
    One quick change you can make with a noticeable impact is to specify an explicit data type for the field:

    Code:
    var form = isc.DynamicForm.create({
     ID:"exampleForm",
     width:450,
     wrapItemTitles: false,
     fields: [ { editorType:"SelectItem", type:"integer" multiple:true } ]
    });
    var bigValueMap = {};
    var value = [];
    for (var i=1; i<2000; i++) {
     bigValueMap[i] = "option #" + i;
     value.add(i);
    };
    form.getField(0).setValueMap(bigValueMap);
    form.getField(0).setValue(value);
    In our testing this makes a noticeable difference. However we also have a developer looking at this use case to see if there's a framework change to improve performance for this use case. We'll follow up with more information when we have anything to share on that.

    Regards
    Isomorphic Software

    Comment


      #3
      We've now made a couple of framework changes to address this issue. The performance should be much better if you pick up the next nightly build on the 12.1 or 13.0 branch (Dated May 29 or above)

      Regards
      Isomorphic Software

      Comment


        #4
        Super!

        Thanks
        Gil

        Comment

        Working...
        X