HISE Logo Forum
    • Categories
    • Register
    • Login

    Suggestions to lower the lag for a panel on a viewport?

    Scheduled Pinned Locked Moved Scripting
    21 Posts 2 Posters 854 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • VirtualVirginV
      VirtualVirgin @d.healey
      last edited by VirtualVirgin

      @d-healey

      So I was able to find a way to switch out the sort functions:

      // use custom sort functions for different columns
      inline function sortArrayByColumn(rowData, columnIndex, comparisonFunction, sortDirection)
      {
          rowData.sort(function[columnIndex, comparisonFunction](a, b)
          {
              var colA = a["col" + columnIndex];
              var colB = b["col" + columnIndex];
              return comparisonFunction(colA, colB);
          });
      
          if (sortDirection)
          {
              return rowData;
          }
          else
          {
              rowData.reverse();
              return rowData;
          }
      };
      

      I store the sort functions in an array and pass them here as "comparisonFunction".

      You can listen to my orchestral mockups here:
      https://www.virtualvirgin.net/

      1 Reply Last reply Reply Quote 0
      • First post
        Last post

      26

      Online

      1.7k

      Users

      11.9k

      Topics

      103.4k

      Posts