* bug#4558: forw_comment slowdown since 22.3
@ 2009-09-25 22:47 Dan Nicolaescu
2019-10-01 13:46 ` Lars Ingebrigtsen
0 siblings, 1 reply; 3+ messages in thread
From: Dan Nicolaescu @ 2009-09-25 22:47 UTC (permalink / raw)
To: bug-gnu-emacs
$ 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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#4558: forw_comment slowdown since 22.3
2009-09-25 22:47 bug#4558: forw_comment slowdown since 22.3 Dan Nicolaescu
@ 2019-10-01 13:46 ` Lars Ingebrigtsen
2020-01-15 5:38 ` Stefan Kangas
0 siblings, 1 reply; 3+ messages in thread
From: Lars Ingebrigtsen @ 2019-10-01 13:46 UTC (permalink / raw)
To: Dan Nicolaescu; +Cc: 4558
Dan Nicolaescu <dann@ics.uci.edu> writes:
> $ 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
(I'm going through old bug reports that unfortunately didn't get any
response at the time.)
I've tried this in Emacs 27, and it seems quite fast -- much less than a
second. But, then again, computers are faster now than they were back
when this was reported. Are you still seeing slow forw_comment in more
modern Emacs versions?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#4558: forw_comment slowdown since 22.3
2019-10-01 13:46 ` Lars Ingebrigtsen
@ 2020-01-15 5:38 ` Stefan Kangas
0 siblings, 0 replies; 3+ messages in thread
From: Stefan Kangas @ 2020-01-15 5:38 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: Dan Nicolaescu, 4558-done
Lars Ingebrigtsen <larsi@gnus.org> writes:
> Dan Nicolaescu <dann@ics.uci.edu> writes:
>
>> $ 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
>
> (I'm going through old bug reports that unfortunately didn't get any
> response at the time.)
>
> I've tried this in Emacs 27, and it seems quite fast -- much less than a
> second. But, then again, computers are faster now than they were back
> when this was reported. Are you still seeing slow forw_comment in more
> modern Emacs versions?
More information was requested, but none was given within 15 weeks, so
I'm closing this bug. If this is still an issue, please reply to this
email (use "Reply to all" in your email client) and we can reopen the
bug report.
Best regards,
Stefan Kangas
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-01-15 5:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-25 22:47 bug#4558: forw_comment slowdown since 22.3 Dan Nicolaescu
2019-10-01 13:46 ` Lars Ingebrigtsen
2020-01-15 5:38 ` Stefan Kangas
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).