Uploaded image for project: 'ZK Spreadsheet'
  1. ZK Spreadsheet
  2. ZSS-1262

Improve sorting performance

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Done
    • Icon: Major Major
    • 3.9.1
    • 3.9.0
    • None
    • Security Level: Jimmy
    • None
    • Sprint 6

      steps to reproduce

      1. run the attached example
      2. comparing 2 API usages to sort

      result

      To sort data with notifying change manually take less time and produce smaller response size.

              sortingRange.setAutoRefresh(false);
              sortingRange.sort(index, false, SortDataOption.NORMAL_DEFAULT, null, true, SortDataOption.NORMAL_DEFAULT, null, true, SortDataOption.NORMAL_DEFAULT, false, true, false);
              sortingRange.notifyChange();
      

      expected result

      since users don't call Range API multiple times, it seems ZSS can optimize this case for users.

      debug info

      • sortNotify.cpuprofile - profile result using notifyChange()
      • the case with nofityChange() runs faster than the case without it.

      with notifyChange() - 734.1ms

      without notifyChange() - 1.43s

        1. withoutNotify.png
          withoutNotify.png
          42 kB
        2. withNotify.png
          withNotify.png
          48 kB
        3. sortNotify.cpuprofile
          713 kB
        4. SortComposer.java
          2 kB
        5. sort.cpuprofile
          750 kB
        6. sort_performance_issue.zul
          0.5 kB
        7. sort_performance_issue.xlsx
          28 kB

            henrichen henrichen
            hawk hawk
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: