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

Improve SimpleMessageSearchIndex performance

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.6
    • None

    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

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

            Dates

              Created:
              Updated:
              Resolved: