GNU bug report logs - #4558
forw_comment slowdown since 22.3

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Dan Nicolaescu <dann@HIDDEN>; dated Fri, 25 Sep 2009 22:55:07 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at submit@HIDDEN:


Received: (at submit) by emacsbugs.donarmstrong.com; 25 Sep 2009 22:49:41 +0000
From dann@HIDDEN Fri Sep 25 15:49:41 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-4.2 required=4.0 tests=AWL,FOURLA,PHONENUMBER,
	X_DEBBUGS_NO_ACK autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from lists.gnu.org (lists.gnu.org [199.232.76.165])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8PMndqb029549
	for <submit@HIDDEN>; Fri, 25 Sep 2009 15:49:41 -0700
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MrJbf-0002Iv-6f
	for bug-gnu-emacs@HIDDEN; Fri, 25 Sep 2009 18:49:39 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MrJba-0002EV-AX
	for bug-gnu-emacs@HIDDEN; Fri, 25 Sep 2009 18:49:38 -0400
Received: from [199.232.76.173] (port=48615 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43)
	id 1MrJba-0002EN-3o
	for bug-gnu-emacs@HIDDEN; Fri, 25 Sep 2009 18:49:34 -0400
Received: from barrelv2.ics.uci.edu ([128.195.1.114]:45646)
	by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24)
	(Exim 4.60)
	(envelope-from <dann@HIDDEN>)
	id 1MrJbZ-0001af-Da
	for bug-gnu-emacs@HIDDEN; Fri, 25 Sep 2009 18:49:33 -0400
Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101])
	by barrelv2.ics.uci.edu (8.13.8+Sun/8.13.8) with ESMTP id n8PMlsE8019228
	for <bug-gnu-emacs@HIDDEN>; Fri, 25 Sep 2009 15:47:54 -0700 (PDT)
Received: (from dann@localhost)
	by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id n8PMlsnK023343;
	Fri, 25 Sep 2009 15:47:54 -0700 (PDT)
Date: Fri, 25 Sep 2009 15:47:54 -0700 (PDT)
Message-Id: <200909252247.n8PMlsnK023343@HIDDEN>
From: Dan Nicolaescu <dann@HIDDEN>
To: bug-gnu-emacs <bug-gnu-emacs@HIDDEN>
Subject: forw_comment slowdown since 22.3
X-Debbugs-No-Ack: yes
Lines: 88
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-ICS-MailScanner-Information: Please contact the ISP for more information
X-ICS-MailScanner-ID: n8PMlsE8019228
X-ICS-MailScanner: Found to be clean
X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.363,
	required 5, autolearn=disabled, ALL_TRUSTED -1.44, TW_YF 0.08)
X-ICS-MailScanner-From: dann@HIDDEN
X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (beta)


$ cd emacs/src

$ cat emacs.c emacs.c emacs.c emacs.c emacs.c > /tmp/emacs.c

$ emacs /tmp/emacs.c
C-x h
M-;
C-x C-s
C-x C-c

$ cat /tmp/t.el
(defun myfwd ()
  (interactive)
  (dotimes (n 1)
    (while (forward-comment 1))
    (while (forward-comment -1)))
  (save-buffers-kill-emacs))
;; increase N if your machine is much faster

Now do:

emacs -Q -l /tmp/t.el /tmp/emacs.c -f myfwd

with both CVS HEAD and 22.3.

The gprof results with 22.3:

Each sample counts as 0.01 seconds.
  %   cumulative   self              self     total           
 time   seconds   seconds    calls   s/call   s/call  name    
 81.40      4.90     4.90  5200163     0.00     0.00  forw_comment
 12.62      5.66     0.76      642     0.00     0.01  scan_sexps_forward
  0.83      5.71     0.05    34941     0.00     0.00  back_comment
  0.66      5.75     0.04  1282235     0.00     0.00  char_quoted
  0.66      5.79     0.04    13498     0.00     0.00  re_search_2
  0.66      5.83     0.04    10738     0.00     0.00  mark_object
  0.33      5.85     0.02    54716     0.00     0.00  read1
  0.33      5.87     0.02    38404     0.00     0.00  Feval
  0.33      5.89     0.02    38012     0.00     0.00  Fbyte_code
  0.17      5.90     0.01   183599     0.00     0.00  specbind
  0.17      5.91     0.01    99154     0.00     0.00  find_interval
  0.17      5.92     0.01    61433     0.00     0.00  get_keymap
  0.17      5.93     0.01    37912     0.00     0.00  funcall_lambda
  0.17      5.94     0.01    23239     0.00     0.00  oblookup
  0.17      5.95     0.01    18737     0.00     0.00  scan_newline
  0.17      5.96     0.01    12410     0.00     0.00  get_keyelt
  0.17      5.97     0.01      664     0.00     0.00  append_glyph
  0.17      5.98     0.01      515     0.00     0.00  re_compile_pattern
  0.17      5.99     0.01        7     0.00     0.00  detect_coding_mask
  0.17      6.00     0.01        3     0.00     0.00  decode_eol


and with CVS HEAD:

Each sample counts as 0.01 seconds.
  %   cumulative   self              self     total           
 time   seconds   seconds    calls   s/call   s/call  name    
 84.45      6.30     6.30  5200163     0.00     0.00  forw_comment
  9.12      6.98     0.68      642     0.00     0.01  scan_sexps_forward
  1.47      7.09     0.11    34941     0.00     0.00  back_comment
  1.21      7.18     0.09  1747491     0.00     0.00  mark_object
  0.40      7.21     0.03  1282235     0.00     0.00  char_quoted
  0.40      7.24     0.03    50653     0.00     0.00  re_search_2
  0.27      7.26     0.02   768825     0.00     0.00  readchar
  0.27      7.28     0.02   738707     0.00     0.00  Faref
  0.27      7.30     0.02    25406     0.00     0.00  re_compile_pattern
  0.27      7.32     0.02    12264     0.00     0.00  mem_insert
  0.13      7.33     0.01   890859     0.00     0.00  mark_vectorlike
  0.13      7.34     0.01   739728     0.00     0.00  readbyte_from_file
  0.13      7.35     0.01   104164     0.00     0.00  balance_possible_root_interval
  0.13      7.36     0.01    64037     0.00     0.00  re_match_2_internal
  0.13      7.37     0.01    34284     0.00     0.00  update_syntax_table
  0.13      7.38     0.01    25395     0.00     0.00  re_compile_fastmap
  0.13      7.39     0.01    21718     0.00     0.00  oblookup
  0.13      7.40     0.01    21080     0.00     0.00  multibyte_chars_in_text
  0.13      7.41     0.01     1170     0.00     0.00  str_as_unibyte
  0.13      7.42     0.01      529     0.00     0.00  mark_char_table
  0.13      7.43     0.01       10     0.00     0.01  Fgarbage_collect
  0.13      7.44     0.01       10     0.00     0.00  free_glyph_matrix
  0.13      7.45     0.01        3     0.00     0.01  Fparse_partial_sexp
  0.07      7.46     0.01   158439     0.00     0.00  multibyte_char_to_unibyte_safe
  0.07      7.46     0.01                             multibyte_char_to_unibyte
  0.00      7.46     0.00   727705     0.00     0.00  char_table_translate
  0.00      7.46     0.00   205798     0.00     0.00  Fcdr

The same number of calls to forw_comment take longer with CVS HEAD.





Report forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#4558; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 31 Oct 2014 17:00:04 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.