From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/41012 Path: main.gmane.org!not-for-mail From: Jesper Harder Newsgroups: gmane.emacs.gnus.general Subject: gnus-correct-length vs. string-width Date: Fri, 28 Dec 2001 15:26:49 +0100 Sender: owner-ding@hpc.uh.edu Message-ID: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035176478 3958 80.91.224.250 (21 Oct 2002 05:01:18 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 05:01:18 +0000 (UTC) Return-Path: Original-Received: (qmail 1034 invoked from network); 28 Dec 2001 14:34:40 -0000 Original-Received: from malifon.math.uh.edu (mail@129.7.128.13) by mastaler.com with SMTP; 28 Dec 2001 14:34:40 -0000 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 16Jy50-0000Ry-00; Fri, 28 Dec 2001 08:33:50 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Fri, 28 Dec 2001 08:33:41 -0600 (CST) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id IAA20983 for ; Fri, 28 Dec 2001 08:33:30 -0600 (CST) Original-Received: (qmail 1007 invoked by alias); 28 Dec 2001 14:33:34 -0000 Original-Received: (qmail 1002 invoked from network); 28 Dec 2001 14:33:34 -0000 Original-Received: from fepc.post.tele.dk (195.41.46.147) by gnus.org with SMTP; 28 Dec 2001 14:33:34 -0000 Original-Received: from defun.localdomain ([195.249.82.232]) by fepC.post.tele.dk (InterMail vM.4.01.03.23 201-229-121-123-20010418) with ESMTP id <20011228143331.OWPY11568.fepC.post.tele.dk@defun.localdomain> for ; Fri, 28 Dec 2001 15:33:31 +0100 Original-To: ding@gnus.org X-Face: &>4YWj)5jy97[$J|&W(MX>,:L.9*|o]WXwhY40_'#-Yc:J-&v+U*?uhK9cqS'eaG(SLj0o E)IS]Ua_g,_"S$Xv)V5^T<^s?U8Tt6XZ~2EdDl^]={px>)aE[grl6~~G`7:vKu!:tZ_.L6,g7qV[; vn><9`4hh(Pf^gH'EJ[!c/$Jog51Q Original-Lines: 37 User-Agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1 (i686-pc-linux-gnu) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:41012 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:41012 Is the built-in function `string-width' known to be broken? I'm asking because the Gnus substitute `gnus-correct-length' seems to be horribly expensive in comparison -- it really degrades performance when generating summary buffers. Here's the elp results for entering an NNTP group with 4000 messages: Function Name Call Count Elapsed Time Average Time ==================================== ========== ============ ============ gnus-topic-select-group 1 103.839829 103.839829 gnus-group-select-group 1 103.839535 103.839535 gnus-group-read-group 1 103.839481 103.839481 gnus-summary-read-group 1 103.839243 103.839243 gnus-summary-read-group-1 1 103.839173 103.839173 gnus-summary-prepare 1 72.383289 72.383289 gnus-summary-prepare-threads 1 69.354715 69.354715 gnus-correct-length 16000 39.978197000 0.0024986373 ... and the same results after doing: (defalias 'gnus-correct-length 'string-width) Function Name Call Count Elapsed Time Average Time ==================================== ========== ============ ============ gnus-topic-select-group 1 66.504824 66.504824 gnus-group-select-group 1 66.50452 66.50452 gnus-group-read-group 1 66.504463 66.504463 gnus-summary-read-group 1 66.504229 66.504229 gnus-summary-read-group-1 1 66.504158 66.504158 gnus-summary-prepare 1 34.509797 34.509797 gnus-select-newsgroup 1 31.573028 31.573028 gnus-summary-prepare-threads 1 31.530489 31.530489 ... gnus-correct-length 16000 0.2750719999 1.719...e-05 I.e. this is about 35% faster.