[PATCH 0/6] lib: replace the message header parser with gmime
[notmuch-archives.git] / f2 / 5f987b87f932de8f50196e8da41839ca476d8f
1 Return-Path: <jani@nikula.org>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 4C803431FC4\r
6         for <notmuch@notmuchmail.org>; Wed, 16 Oct 2013 12:00:27 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.7\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id gctA98Lw-GyQ for <notmuch@notmuchmail.org>;\r
16         Wed, 16 Oct 2013 12:00:19 -0700 (PDT)\r
17 Received: from mail-ea0-f178.google.com (mail-ea0-f178.google.com\r
18         [209.85.215.178]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id F29F7431FAE\r
21         for <notmuch@notmuchmail.org>; Wed, 16 Oct 2013 12:00:18 -0700 (PDT)\r
22 Received: by mail-ea0-f178.google.com with SMTP id a15so584795eae.9\r
23         for <notmuch@notmuchmail.org>; Wed, 16 Oct 2013 12:00:17 -0700 (PDT)\r
24 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
25         d=1e100.net; s=20130820;\r
26         h=x-gm-message-state:from:to:cc:subject:date:message-id;\r
27         bh=G9U5RWyJjmaGecmuA6hU+oc4YCV4x1k5fLR30zG6cmI=;\r
28         b=mvkXKhFUt3exYy8FDX654uqJrzuDNsV57cMDHkfxgFzE7UjLsPKLa0w/M5XNyK+P0I\r
29         d+x4AInFp6iMZNoLnyp3gonr5gChs1qxlQWhKGjkSkwOrEfDncrvn80BR5eUBcgu6OXI\r
30         u8UKJ0dLgf0PJ5udXZ+To5YK+elAAQsytUkjxa+nOncD/KIM1skESXW/SOGujYSRK5mF\r
31         waj+ki2Yw3T0+bCYsxb3h9LyYdFefodzKd9gfzARzuoynw7yZybzFfKJqvv0nRn60aEX\r
32         66zZPFGrT1OZSab6W1unYHSE1o6W1D5hFjdwQ6LEPmp8x9z77e5FfMWBSig1egBhDyyO\r
33         3dRQ==\r
34 X-Gm-Message-State:\r
35  ALoCoQkAtWjBN+yytMiLI7EJm996pBghwwWR24OayEuFj0e12Gvapp/9sLOGpSYea7VcM3G4ZIQi\r
36 X-Received: by 10.15.44.8 with SMTP id y8mr6771790eev.38.1381950015296;\r
37         Wed, 16 Oct 2013 12:00:15 -0700 (PDT)\r
38 Received: from localhost (dsl-hkibrasgw2-58c36f-91.dhcp.inet.fi.\r
39         [88.195.111.91]) by mx.google.com with ESMTPSA id\r
40         r48sm182994044eev.14.1969.12.31.16.00.00\r
41         (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
42         Wed, 16 Oct 2013 12:00:14 -0700 (PDT)\r
43 From: Jani Nikula <jani@nikula.org>\r
44 To: notmuch@notmuchmail.org\r
45 Subject: [PATCH 0/6] lib: replace the message header parser with gmime\r
46 Date: Wed, 16 Oct 2013 22:00:07 +0300\r
47 Message-Id: <cover.1381948853.git.jani@nikula.org>\r
48 X-Mailer: git-send-email 1.8.4.rc3\r
49 X-BeenThere: notmuch@notmuchmail.org\r
50 X-Mailman-Version: 2.1.13\r
51 Precedence: list\r
52 List-Id: "Use and development of the notmuch mail system."\r
53         <notmuch.notmuchmail.org>\r
54 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
55         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
56 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
57 List-Post: <mailto:notmuch@notmuchmail.org>\r
58 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
59 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
60         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
61 X-List-Received-Date: Wed, 16 Oct 2013 19:00:27 -0000\r
62 \r
63 Hi all, here's something to debate. ;)\r
64 \r
65 We have a homebrew message header parser in the lib, and we also parse\r
66 messages, including headers, using gime during indexing. This means for\r
67 messages that get indexed we parse the headers twice. (Duplicates and\r
68 non-emails only get parsed using our own parser.)\r
69 \r
70 The two parsers handle some things differently, which may cause\r
71 confusion (tab handling in header folding for example).\r
72 \r
73 In the interest of reducing somewhat complicated code to maintain, just\r
74 nuke the homebrew parser in favor of gmime. I did not look into the\r
75 history of why we have our own parser to begin with; it was more fun to\r
76 just do some coding. ;)\r
77 \r
78 Patches 1-3 do prep work to fix some of the differences in the parsers\r
79 in advance. Arguably they are not that bad regardless of the parser\r
80 change.\r
81 \r
82 Patches 4-5 actually make the change. Having two patches is a somewhat\r
83 artificial division, but perhaps makes it easier to review.\r
84 \r
85 Patch 6 is just a hack to make perf tests not ignore so many mails... we\r
86 have quite a bit of non-emails in the corpus by gmime parser\r
87 standards. And this illlustrates one of the differences in the parsers.\r
88 \r
89 \r
90 BR,\r
91 Jani.\r
92 \r
93 \r
94 Austin Clements (1):\r
95   emacs: Sanitize authors and subjects in search and show\r
96 \r
97 Jani Nikula (5):\r
98   cli: sanitize tabs to spaces in notmuch search\r
99   cli: make the hacky from guessing more liberal\r
100   lib: replace the header parser with gmime\r
101   lib: parse messages only once\r
102   HACK: fix broken messages in the perf test corpus\r
103 \r
104  emacs/notmuch-lib.el              |   6 +\r
105  emacs/notmuch-show.el             |   7 +-\r
106  emacs/notmuch.el                  |   6 +-\r
107  lib/database.cc                   |   6 +-\r
108  lib/index.cc                      |  70 +-------\r
109  lib/message-file.c                | 351 +++++++++++++-------------------------\r
110  lib/message.cc                    |   6 +\r
111  lib/notmuch-private.h             |  19 ++-\r
112  notmuch-reply.c                   |   4 +-\r
113  notmuch-search.c                  |   4 +-\r
114  performance-test/perf-test-lib.sh |   4 +\r
115  11 files changed, 172 insertions(+), 311 deletions(-)\r
116 \r
117 -- \r
118 1.8.4.rc3\r
119 \r