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

Improve sorting performance

    XMLWordPrintable

Details

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

    Description

      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

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: