Pentaho Analysis - Mondrian
  1. Pentaho Analysis - Mondrian
  2. MONDRIAN-843

Performance Improvement: Don't copy whole list on Filter

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Severe Severe
    • Resolution: Fixed
    • Affects Version/s: 3.2.1 GA (3.7.0 GA Suite Release)
    • Component/s: None
    • Labels:
      None

      Description

      MONDRIAN: performance improvement. Don't create a copy of the list and
      then filter elements from it, especially as removing elements one
      at a time can be quite inefficient. Instead, just create an empty
      list and add the matching items to it. TODO: a good way to guess
      a better initalCapacity than the default?

        Activity

        Hide
        Julian Hyde added a comment -
        Sounds reasonable. Joe or EricM, can you check in. However, you should add a performance test that has abyssmal performance if this bug is not fixed. (Should not be hard: by my reckoning this is an O(n^2) bug that should suck on a list with 10,000 elements.)
        Show
        Julian Hyde added a comment - Sounds reasonable. Joe or EricM, can you check in. However, you should add a performance test that has abyssmal performance if this bug is not fixed. (Should not be hard: by my reckoning this is an O(n^2) bug that should suck on a list with 10,000 elements.)
        Hide
        Joe Barnett added a comment -
        updated packChange with a performance test. not quite as abyssmal as we might like, but does show the difference.

        can have Eric commit this next week, or I can commit if given permissions. should this go to 3.2 mondrian-release branch or mainline mondrian branch?
        Show
        Joe Barnett added a comment - updated packChange with a performance test. not quite as abyssmal as we might like, but does show the difference. can have Eric commit this next week, or I can commit if given permissions. should this go to 3.2 mondrian-release branch or mainline mondrian branch?
        Hide
        Luc Boudreau added a comment -
        Fixed in revision 13980.
        Show
        Luc Boudreau added a comment - Fixed in revision 13980.
        Hide
        Luc Boudreau added a comment -
        Tested. It does make an impact on the filtering and not on anything else in the performance suite.
        Show
        Luc Boudreau added a comment - Tested. It does make an impact on the filtering and not on anything else in the performance suite.

          People

          • Assignee:
            Luc Boudreau
            Reporter:
            Joe Barnett
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: