1 Return-Path: <dmitry.kurochkin@gmail.com>
\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 78017429E27
\r
6 for <notmuch@notmuchmail.org>; Tue, 13 Dec 2011 10:24:51 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
\r
13 FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
14 Received: from olra.theworths.org ([127.0.0.1])
\r
15 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id 0PHJGqyJevKy for <notmuch@notmuchmail.org>;
\r
17 Tue, 13 Dec 2011 10:24:51 -0800 (PST)
\r
18 Received: from mail-fx0-f53.google.com (mail-fx0-f53.google.com
\r
19 [209.85.161.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
20 (No client certificate requested)
\r
21 by olra.theworths.org (Postfix) with ESMTPS id B773F429E25
\r
22 for <notmuch@notmuchmail.org>; Tue, 13 Dec 2011 10:24:50 -0800 (PST)
\r
23 Received: by faaa5 with SMTP id a5so475744faa.26
\r
24 for <notmuch@notmuchmail.org>; Tue, 13 Dec 2011 10:24:49 -0800 (PST)
\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
\r
26 h=from:to:cc:subject:in-reply-to:references:user-agent:date
\r
27 :message-id:mime-version:content-type;
\r
28 bh=0bYYEpqs72Qw5usXcqKQ3nmvpqSuSJw3NOR6dPAOUpk=;
\r
29 b=syP9fTnK8PM7Yv9jqmwwOfhrya2GbRcmM/rnGmB0opBm8CcyUgn6XN+yjlhMjDa7Oz
\r
30 xOCAXP+ud2i2ZS7WYHAPzzwP++2wsajCt/LDSstyKwAyytLPp+pP+YVc2tbUoDctjZK5
\r
31 JubwUFuNrOMQFydK5czfRLILrmWWZBnba+k+8=
\r
32 Received: by 10.216.132.164 with SMTP id o36mr3309975wei.76.1323800689107;
\r
33 Tue, 13 Dec 2011 10:24:49 -0800 (PST)
\r
34 Received: from localhost ([91.144.186.21])
\r
35 by mx.google.com with ESMTPS id dd4sm30874971wib.1.2011.12.13.10.24.47
\r
36 (version=TLSv1/SSLv3 cipher=OTHER);
\r
37 Tue, 13 Dec 2011 10:24:48 -0800 (PST)
\r
38 From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
\r
39 To: tomi.ollila@iki.fi, notmuch@notmuchmail.org
\r
40 Subject: Re: [PATCH] notmuch: unref charset_filter (once more) to fix one
\r
42 In-Reply-To: <1323800328-17014-1-git-send-email-tomi.ollila@iki.fi>
\r
43 References: <877h20wrf3.fsf@gmail.com>
\r
44 <1323800328-17014-1-git-send-email-tomi.ollila@iki.fi>
\r
45 User-Agent: Notmuch/0.10.2+96~g74e5ae5 (http://notmuchmail.org) Emacs/23.3.1
\r
46 (x86_64-pc-linux-gnu)
\r
47 Date: Tue, 13 Dec 2011 22:24:11 +0400
\r
48 Message-ID: <87wra0uy7o.fsf@gmail.com>
\r
50 Content-Type: text/plain; charset=us-ascii
\r
51 Cc: Tomi Ollila <tomi.ollila@iki.fi>
\r
52 X-BeenThere: notmuch@notmuchmail.org
\r
53 X-Mailman-Version: 2.1.13
\r
55 List-Id: "Use and development of the notmuch mail system."
\r
56 <notmuch.notmuchmail.org>
\r
57 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
58 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
59 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
60 List-Post: <mailto:notmuch@notmuchmail.org>
\r
61 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
62 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
63 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
64 X-List-Received-Date: Tue, 13 Dec 2011 18:24:51 -0000
\r
66 On Tue, 13 Dec 2011 20:18:48 +0200, tomi.ollila@iki.fi wrote:
\r
67 > From: Tomi Ollila <tomi.ollila@iki.fi>
\r
69 > In my test case added g_object_unref(charset_filter) reduces memory
\r
70 > consumption over 90% when 'notmuch show --format=text "*"' is
\r
71 > executed (~11000 messages, RES ~330M -> ~25M).
\r
73 > Thanks Dmitry. I did not realize unref unreferences, does not deallocate
\r
74 > memory/data structures. g_mime_stream_filter_add() takes an additional
\r
75 > reference to the charset_filter object.
\r
82 > notmuch-show.c | 5 ++++-
\r
83 > 1 files changed, 4 insertions(+), 1 deletions(-)
\r
85 > diff --git a/notmuch-show.c b/notmuch-show.c
\r
86 > index 873a7c4..8da3295 100644
\r
87 > --- a/notmuch-show.c
\r
88 > +++ b/notmuch-show.c
\r
89 > @@ -471,9 +471,12 @@ show_text_part_content (GMimeObject *part, GMimeStream *stream_out)
\r
90 > /* This result can be NULL for things like "unknown-8bit".
\r
91 > * Don't set a NULL filter as that makes GMime print
\r
92 > * annoying assertion-failure messages on stderr. */
\r
93 > - if (charset_filter)
\r
94 > + if (charset_filter) {
\r
95 > g_mime_stream_filter_add (GMIME_STREAM_FILTER (stream_filter),
\r
97 > + g_object_unref (charset_filter);
\r
102 > wrapper = g_mime_part_get_content_object (GMIME_PART (part));
\r
106 > _______________________________________________
\r
107 > notmuch mailing list
\r
108 > notmuch@notmuchmail.org
\r
109 > http://notmuchmail.org/mailman/listinfo/notmuch
\r