title: How expensive is IMAP search?
body: <p>In our application we want to issue imap_search very frequently, like</p>
  
  <pre><code>$result = imap_search($mbox,'ON "20-May-2008" SUBJECT "ip list" TO "user1@gmail.com" FROM "user2@gmail.com"');
  </code></pre>
  
  <p>How IMAP search is implemented? is it using a linear walk? if yes, what is the alternative for this?</p>
  
  <p>thanks</p>