On Wed, 20 Dec 2006, Timo Sirainen wrote:
> I wanted an ability to stop an ongoing SEARCH command, so that it'd be
> possible to add a "Cancel search" button in the client.
How long do searches take in your server?
Once messages are parsed, I've never had a search in my server fail to
outrun anything like a CANCEL operation. The only time I've seen a search
of a large mailbox take a noticable amount of real time is when a large
number of messages haven't been parsed for MIME structure yet. That will
be resolved in a forthcoming update to the mix format that caches
envelopes and bodystructures.
Due to IMAP's stateful nature, in most cases the only choices are to wait
or to abandon the session. SEARCH, SORT, and THREAD are the only obvious
commands that could benefit from CANCEL; and in all three cases it should
be possible to resolve performance problems.
In general, I think that it's preferable to remedy performance problems
rather than to create a complex mechanism (and the necessary semantics of
CANCEL are complex) to work around performance problems.
With that in mind, CANCEL seems to me to be a solution in search of a
problem.
-- Mark --
http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.
Si vis pacem, para bellum.