Re: slowdown in notmuch perf suite with xapian 1.3.5
[notmuch-archives.git] / ca / 58ff72f920bfcaa52bc4ad36387345db2457b5
1 Return-Path: <cworth@cworth.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 3ED3C431FD0\r
6         for <notmuch@notmuchmail.org>; Tue, 24 May 2011 15:01:14 -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.01\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0.01 tagged_above=-999 required=5\r
12         tests=[T_MIME_NO_TEXT=0.01] 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 E4Fnu6jCToEn for <notmuch@notmuchmail.org>;\r
16         Tue, 24 May 2011 15:01:12 -0700 (PDT)\r
17 Received: from arlo.cworth.org (arlo.cworth.org [50.43.72.2])\r
18         by olra.theworths.org (Postfix) with ESMTP id 1CB5A431FB6\r
19         for <notmuch@notmuchmail.org>; Tue, 24 May 2011 15:01:12 -0700 (PDT)\r
20 Received: from yoom.home.cworth.org (localhost [127.0.0.1])\r
21         by arlo.cworth.org (Postfix) with ESMTP id 617B129A058;\r
22         Tue, 24 May 2011 15:01:10 -0700 (PDT)\r
23 Received: by yoom.home.cworth.org (Postfix, from userid 1000)\r
24         id 33EF925417E; Tue, 24 May 2011 15:01:10 -0700 (PDT)\r
25 From: Carl Worth <cworth@cworth.org>\r
26 To: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>, notmuch@notmuchmail.org\r
27 Subject: Re: [PATCH] Save and restore point explicitly in\r
28         `notmuch-wash-toggle-invisible-action'.\r
29 In-Reply-To: <8762ozrfrr.fsf@gmail.com>\r
30 References: <1306090675-26982-1-git-send-email-dmitry.kurochkin@gmail.com>\r
31         <1306164587-20326-1-git-send-email-dmitry.kurochkin@gmail.com>\r
32         <87oc2rlujb.fsf@yoom.home.cworth.org> <8762ozrfrr.fsf@gmail.com>\r
33 User-Agent: Notmuch/0.5 (http://notmuchmail.org) Emacs/23.3.1\r
34         (i486-pc-linux-gnu)\r
35 Date: Tue, 24 May 2011 15:01:04 -0700\r
36 Message-ID: <87oc2rvjvj.fsf@yoom.home.cworth.org>\r
37 MIME-Version: 1.0\r
38 Content-Type: multipart/signed; boundary="=-=-=";\r
39         micalg=pgp-sha1; protocol="application/pgp-signature"\r
40 X-BeenThere: notmuch@notmuchmail.org\r
41 X-Mailman-Version: 2.1.13\r
42 Precedence: list\r
43 List-Id: "Use and development of the notmuch mail system."\r
44         <notmuch.notmuchmail.org>\r
45 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
46         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
47 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
48 List-Post: <mailto:notmuch@notmuchmail.org>\r
49 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
50 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
51         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
52 X-List-Received-Date: Tue, 24 May 2011 22:01:14 -0000\r
53 \r
54 --=-=-=\r
55 Content-Transfer-Encoding: quoted-printable\r
56 \r
57 On Wed, 25 May 2011 00:43:20 +0400, Dmitry Kurochkin <dmitry.kurochkin@gmai=\r
58 l.com> wrote:\r
59 > Now, looking at Emacs source code, save_excursion_save() uses\r
60 > point_marker() to save the point.  As you said above, markers are\r
61 > updated when the corresponding text is updated.  That explains why the\r
62 > cursor jumps when using `save-excursion'.\r
63 >=20\r
64 > On the other hand, `point' returns position as an integer.  Which is\r
65 > just what we need.\r
66 \r
67 Ah. So that explains why your patch is actually making a difference.\r
68 \r
69 But I've usually had "jumping cursor" problems when using an integer,\r
70 (and switching to a marker fixes it). For example, imagine the following\r
71 operation:\r
72 \r
73         User positions cursor on some word\r
74         Our code saves point as an integer\r
75         Some operation inserts new text before point\r
76         Our code restores the cursor to the saved integer\r
77 \r
78 This sequence restores point to the same integer position in the buffer,\r
79 but logically makes the cursor appear to "jump" to the user, (since the\r
80 cursor will no longer be on the word it was on before but will now be\r
81 earlier in the buffer).\r
82 \r
83 The fix for the above is to switch from an integer to a marker.\r
84 \r
85 So I'm curious to know the case you're hitting where you getbetter\r
86 behavior by switching from a marker to an integer. Can you describe it\r
87 in a bit more detail?\r
88 \r
89 =2DCarl\r
90 \r
91 --=-=-=\r
92 Content-Type: application/pgp-signature\r
93 \r
94 -----BEGIN PGP SIGNATURE-----\r
95 Version: GnuPG v1.4.11 (GNU/Linux)\r
96 \r
97 iEYEARECAAYFAk3cKqAACgkQ6JDdNq8qSWjiWwCeJtjy0e8bg71+kUr5sA727yDQ\r
98 zfoAnR/3TiPR6kedeWL1iBqBY5bU2tML\r
99 =heXN\r
100 -----END PGP SIGNATURE-----\r
101 --=-=-=--\r