Uploaded image for project: 'James Mailbox'
  1. James Mailbox
  2. MAILBOX-198

Improve SimpleMessageSearchIndex performance

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.6
    • Component/s: None
    • Labels:

      Description

      SimpleMessageSearchIndex has O(n^2) performance for searches at the moment. This leads to very bad message check performance for e.g the Android Mailclient on big mailboxes.
      The reason for that is that the current code buffers messages in an ArrayList while performing an contains() check before each add(). A TreeSet is more appropriate here reducing runtime to O(n*log).

      Furthermore the existing UID range optimization is not effective when other criteria are conjugated with the query.

        Attachments

        1. MAILBOX-198-3.patch
          5 kB
          Jan-Philipp Niewerth

          Activity

            People

            • Assignee:
              eric@apache.org Eric Charles
              Reporter:
              jan.niewerth Jan-Philipp Niewerth
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: