Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 376CF431FD0 for ; Tue, 12 Jul 2011 22:03:29 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Vrv6w1mBZ-Wg for ; Tue, 12 Jul 2011 22:03:28 -0700 (PDT) Received: from dmz-mailsec-scanner-8.mit.edu (DMZ-MAILSEC-SCANNER-8.MIT.EDU [18.7.68.37]) by olra.theworths.org (Postfix) with ESMTP id BBCC2431FB6 for ; Tue, 12 Jul 2011 22:03:28 -0700 (PDT) X-AuditID: 12074425-b7bcaae000000a1b-b9-4e1d26f79f8e Received: from mailhub-auth-4.mit.edu ( [18.7.62.39]) by dmz-mailsec-scanner-8.mit.edu (Symantec Messaging Gateway) with SMTP id F0.05.02587.7F62D1E4; Wed, 13 Jul 2011 01:02:47 -0400 (EDT) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id p6D53RH5019787; Wed, 13 Jul 2011 01:03:28 -0400 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91]) (authenticated bits=0) (User authenticated as amdragon@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id p6D53Qao003253 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); Wed, 13 Jul 2011 01:03:27 -0400 (EDT) Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.72) (envelope-from ) id 1QgrbQ-0004tA-7E; Wed, 13 Jul 2011 01:03:16 -0400 Date: Wed, 13 Jul 2011 01:03:16 -0400 From: Austin Clements To: Istvan Marko Subject: Re: Slowness (search opens every email file?) Message-ID: <20110713050316.GH25558@mit.edu> References: <20110711190721.GA5386@compy.jasonwoof.org> <20110712202459.GB15019@compy.jasonwoof.org> <20110713022247.GG25558@mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpkleLIzCtJLcpLzFFi42IRYrdT1/2uJutncOe1jcXL3doW12/OZHZg 8vi86Cmjx7NVt5gDmKK4bFJSczLLUov07RK4Mvp6v7MW9HFUPOjbydTAuJqti5GTQ0LAROL3 5PVMELaYxIV764HiXBxCAvsYJR73f2OBcDYwSrT1vGSFcE4ySWw5tJgZwlnCKLGhYz1jFyMH B4uAqsSDtyYgo9gENCS27V8OFhYRUJN48iwfJMwsoCWxdeMHRhBbWMBM4uq+V2A2r4COxKN5 V5lBbCGBu0wSpybnQMQFJU7OfMIC03vj30smkJHMAtISy/9xgIQ5BXQlnr9dC1YiKqAicW1/ O9sERqFZSLpnIemehdC9gJF5FaNsSm6Vbm5iZk5xarJucXJiXl5qka6FXm5miV5qSukmRnBI u6juYJxwSOkQowAHoxIPr0S8jJ8Qa2JZcWXuIUZJDiYlUd6FKrJ+QnxJ+SmVGYnFGfFFpTmp xYcYJTiYlUR41/8GKudNSaysSi3Kh0lJc7AoifOGeP/3FRJITyxJzU5NLUgtgsnKcHAoSfB2 AGNXSLAoNT21Ii0zpwQhzcTBCTKcB2j4P1WgGt7igsTc4sx0iPwpRkUpcd4pIM0CIImM0jy4 XljKecUoDvSKMG8pSBUPMF3Bdb8CGswENPi1tCTI4JJEhJRUA6Ps5AUL160LUTq6z/r/pHl6 Ahz3Hqx6ofJONS1eL2SejMitaxMuJbP1+ljuSt2V/ORat8/XCdkpbTtzflq63z21aWnV8bJb 0To7ZBawfn2ak3TX0mZC1sF3ZeW7Q5tC3jPlir9Oc2OTO/P9TcEVm6DmmyfOscfpa93MiPvi wyqbcP3LhR8yffVKLMUZiYZazEXFiQBzQhCiFAMAAA== Cc: Notmuch Mail X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2011 05:03:29 -0000 Quoth Istvan Marko on Jul 12 at 8:07 pm: > Austin Clements writes: > > > I'd say this patch looks good other than coding style > > - Tab indentation > > - /* */ comments, starting with a capital letter > > - Space between function name and open paren > > - Space after comma in argument lists > > - Spaces around assignment operator > > Thanks, fixed the ones I see: + /* Fetch header from the appropriate xapian value field if + * available */ + if (strcmp(header, "from") == 0) + value = message->doc.get_value(NOTMUCH_VALUE_FROM); + else if (strcmp(header, "subject") == 0) + value = message->doc.get_value (NOTMUCH_VALUE_SUBJECT); + else if (strcmp(header, "message-id") == 0) + value = message->doc.get_value (NOTMUCH_VALUE_MESSAGE_ID); The strcmp's should have a space before the paren, as should the first get_value. (Yeah, it's weird. Blame glib.) Also, it occurred to me that these should be strcasecmp's, since headers are case-insensitive.