From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/26940 Path: main.gmane.org!not-for-mail From: Hrvoje Niksic Newsgroups: gmane.emacs.gnus.general Subject: Re: Article size limit for emphasis and buttonization Date: 16 Nov 1999 11:59:54 +0100 Sender: owner-ding@hpc.uh.edu Message-ID: <9t9ogcun1lh.fsf@mraz.iskon.hr> References: <9t97ljioi80.fsf@mraz.iskon.hr> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035164055 22026 80.91.224.250 (21 Oct 2002 01:34:15 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 01:34:15 +0000 (UTC) Return-Path: Original-Received: from bart.math.uh.edu (bart.math.uh.edu [129.7.128.48]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id GAA00113 for ; Tue, 16 Nov 1999 06:00:39 -0500 (EST) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by bart.math.uh.edu (8.9.1/8.9.1) with ESMTP id FAB02058; Tue, 16 Nov 1999 05:00:38 -0600 (CST) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Tue, 16 Nov 1999 05:00:44 -0600 (CST) Original-Received: from sclp3.sclp.com (root@sclp3.sclp.com [204.252.123.139]) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id FAA12825 for ; Tue, 16 Nov 1999 05:00:31 -0600 (CST) Original-Received: from mraz.iskon.hr (mail@mraz.iskon.hr [195.29.170.8]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id FAA29990 for ; Tue, 16 Nov 1999 05:59:57 -0500 (EST) Original-Received: from hniksic by mraz.iskon.hr with local (Exim 3.03 #1 (Debian)) id 11ngL5-0007BL-00 for ; Tue, 16 Nov 1999 11:59:55 +0100 Original-To: ding@gnus.org X-Attribution: Hrvoje X-Face: &{dT~)Pu6V<0y?>3p$;@vh\`C7xB~A0T-J%Og)J,@-1%q6Q+, gs<-9M#&`I8cJp2b1{vPE|~+JE+gx;a7%BG{}nY^ehK1"q#rG O,Rn1A_Cy%t]V=Brv7h writes: > Hrvoje Niksic writes: > > > I've just received a huge email on xemacs-patches, and it took several > > seconds to display -- that on my brand new Pentium 3, in an XEmacs > > built with all optimizations and no debugging! > > If are talking about Martin's "man & Make" patch Yes. > 34 seconds (Ultra 1, with 64 MB) How long does it take after turning off the emphasis and buttonization treatments? > > The regexp in question is in fact a list of beautiful regexps, that > > looks like this: > > > > > > (("\\(\\s-\\|^\\)\\(_\\(\\(\\w\\|_[^_]\\)+\\)_\\)\\(\\s-\\|[?!.,;]\\)" 2 3 gnus-emphasis-underline) > > Is there any chance this stuff can be sped up. For instance with > non-greedy regexps, optimized or not using regexps at all? I thought about that some time ago, but I concluded it would be too much work. I imagined playing with non-regexp specifications of faces using sexp, e.g. (?* sentence ?*), so that you can optimize by searching for asterisks with `search-forward', and then seeing what can be done, etc. But after thinking more about it, I concluded that: a) Elisp is slow as hell, which made me wonder if doing it would be any faster than the current regexp approach (but OTOH the regexps were *less* ugly at the time.) b) It's too much work. If it was to be useful, it would have to support the equivalent of regexp * operator, and such. There is no way it can be fast in Elisp. > Doesn't Gnus have to scan over the buffer anyway? So why are these > so much slower? I don't understand this. Much slower than what? > Since this is all user eye candy: It really should do stuff like > this lazily (yes, I know you hate that). I don't hate it if it's done right. I haven't seen it done right, yet.