--- /dev/null
+Return-Path: <wael.nasreddine@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 4B282431FC2\r
+ for <notmuch@notmuchmail.org>; Sat, 10 May 2014 14:40:22 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.799\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
+ tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+ FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id widObpTByLOR for <notmuch@notmuchmail.org>;\r
+ Sat, 10 May 2014 14:40:17 -0700 (PDT)\r
+Received: from mail-pa0-f42.google.com (mail-pa0-f42.google.com\r
+ [209.85.220.42]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 79B2F431FBF\r
+ for <notmuch@notmuchmail.org>; Sat, 10 May 2014 14:40:17 -0700 (PDT)\r
+Received: by mail-pa0-f42.google.com with SMTP id rd3so5864345pab.29\r
+ for <notmuch@notmuchmail.org>; Sat, 10 May 2014 14:40:16 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+ h=from:to:subject:date:message-id;\r
+ bh=iva44FRrQeD7yFxdEWrn+LtdG1DRWqkuAl16k+6LPwc=;\r
+ b=Yf8W+ylKebMhqKlWeGKUpBDZNEE//T2ia+3CkLXaSOzbZGGO3hrxn+sqK8M6Pb3nE6\r
+ ghNa3TPRfJm5X7z7fDhvWVHOThQvSA3aRdTH+vIJbekmP03NR1ACn1zq1AY6uIUVUZvw\r
+ 7L6q/9puu+C4tHCpIvo3w1KgjWEDQKk/1x55PF6Ckk/bvZ9KZN+B4yXUqXQuy6ZTejRL\r
+ HGnICiEtOA1TFsMoT3dwkGvaVJGJini1iOBqoJIuK8JOqcph1oLwJ9Tq0K/E62VV0rP/\r
+ x/XizZW0i5WblbQN2i74dUIHhtLPDA07u23uxm+orGzkRW0694FgpO6VGcJMJXaTADLo\r
+ gtyA==\r
+X-Received: by 10.67.2.34 with SMTP id bl2mr36866952pad.58.1399758016743;\r
+ Sat, 10 May 2014 14:40:16 -0700 (PDT)\r
+Received: from localhost ([2620:0:1000:2e00:dc94:fbf5:1606:3c5b])\r
+ by mx.google.com with ESMTPSA id\r
+ wp3sm14497556pbc.67.2014.05.10.14.40.15 for <notmuch@notmuchmail.org>\r
+ (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
+ Sat, 10 May 2014 14:40:16 -0700 (PDT)\r
+From: "Wael M. Nasreddine" <wael.nasreddine@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH] ruby: Add wrapper for notmuch_query_count_threads\r
+Date: Sat, 10 May 2014 14:40:10 -0700\r
+Message-Id: <1399758011-26217-1-git-send-email-wael.nasreddine@gmail.com>\r
+X-Mailer: git-send-email 1.9.1.423.g4596e3a\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sat, 10 May 2014 21:40:22 -0000\r
+\r
+\r
+This patch exposes query.cc::notmuch_query_count_threads to Ruby, the\r
+benchmark on 85k emails is amazing:\r
+\r
+ user system total real\r
+query.count_threads 6.270000 0.240000 6.510000 ( 6.507064)\r
+query.search_threads.count 14.040000 3.130000 17.170000 ( 17.172222)\r