From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: rfc2047-decode-string in C? Date: Fri, 10 Sep 2010 15:47:57 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1284126516 13628 80.91.229.12 (10 Sep 2010 13:48:36 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 10 Sep 2010 13:48:36 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 10 15:48:34 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Ou3xv-0006R2-Kq for ged-emacs-devel@m.gmane.org; Fri, 10 Sep 2010 15:48:34 +0200 Original-Received: from localhost ([127.0.0.1]:57751 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ou3xt-0006FA-9U for ged-emacs-devel@m.gmane.org; Fri, 10 Sep 2010 09:48:29 -0400 Original-Received: from [140.186.70.92] (port=37080 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ou3xX-00067O-49 for emacs-devel@gnu.org; Fri, 10 Sep 2010 09:48:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Ou3xQ-00071O-IQ for emacs-devel@gnu.org; Fri, 10 Sep 2010 09:48:04 -0400 Original-Received: from impaqm2.telefonica.net ([213.4.138.2]:41260) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ou3xQ-00071C-D5 for emacs-devel@gnu.org; Fri, 10 Sep 2010 09:48:00 -0400 Original-Received: from IMPmailhost6.adm.correo ([10.20.102.127]) by IMPaqm2.telefonica.net with bizsmtp id 51iS1f00G2kvMAa3M1nyE4; Fri, 10 Sep 2010 15:47:59 +0200 Original-Received: from ceviche.home ([83.61.42.227]) by IMPmailhost6.adm.correo with BIZ IMP id 51nx1f01F4u4RdP1m1nyhq; Fri, 10 Sep 2010 15:47:58 +0200 X-Brightmail-Tracker: AAAAAA== X-TE-authinfo: authemail="monnier$movistar.es" |auth_email="monnier@movistar.es" X-TE-AcuTerraCos: auth_cuTerraCos="cosuitnetc01" Original-Received: by ceviche.home (Postfix, from userid 20848) id B87BF660D2; Fri, 10 Sep 2010 15:47:57 +0200 (CEST) In-Reply-To: (Lars Magne Ingebrigtsen's message of "Fri, 10 Sep 2010 14:49:34 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:129895 Archived-At: >> Actually, I think Emacs could do with moving more things down into >> the C layer. > Speaking of which -- I've been elp-ing Gnus group entry a bit, and Gnus > spends quite a but of time doing rfc2047 decoding. If I read the > results correctly, that's a quite significant portion of the time. > rfc2047-encoding looks like this: > =?iso-8859-1?q?fo=F2o?= > There are two encodings -- b and q. The b (base64) is already in C > (was I the one that put it there? Hm.), but the q isn't > (quoted-printable), so I'd propose two new C functions: > `quoted-printable-decode-string' and `rfc2047-decode-string'. > I can implement them and do some benchmarking? A version of quoted-printable-decode-string written in C would be fine, yes. For rfc2047-decode-string, I'd need some convincing evidence that there is a large benefit. Stefan "who uses Gnus and sometimes finds it quite slow, tho the main slowness is when I do gnus-group-get-new-news over IMAP"