User:Emre/tb/architecture/diagrams/messagesearch

From MozillaWiki
Jump to navigation Jump to search

Message Search Components

Class Diagram

Message-search.cd.png

Offline Search

Search queries done in message header scope are conducted on local database, for both offline and online accounts. If the search scope is message body, the search type is determined by the mode (offline/online) of the selected folder.

Search operation is executed by the UI thread in constant time slices. When the user type a search query, a timer object is created to complete the operation in an asynchronous fashion. Each tick, or time slice, conducts a serial, contiguous search on the database. Matching records are added into the result table and the listeners are notified to consume the results.

Message-search-offline.sd.png

Online Search

Message-search-online.sd.png