unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: David Reitter <david.reitter@gmail.com>
To: Chong Yidong <cyd@stupidchicken.com>
Cc: Emacs-Devel devel <emacs-devel@gnu.org>
Subject: Re: Low redisplay performance (23 regression)
Date: Mon, 20 Apr 2009 19:20:23 -0400	[thread overview]
Message-ID: <A463224E-D678-4B59-9093-703C4BEFE460@gmail.com> (raw)
In-Reply-To: <873ac3arbf.fsf@cyd.mit.edu>

[-- Attachment #1: Type: text/plain, Size: 7644 bytes --]

On Apr 20, 2009, at 6:33 PM, Chong Yidong wrote:

> David Reitter <david.reitter@gmail.com> writes:
>
>> I'm wondering if others get the same on other platforms comparing 22
>> and 23, or if this is a problem specifically in the NS port (for
>> example, with setting drawing color or the like).
>
> On GNU/Linux, I do not experience much of a difference in performance
> between Emacs 22 and Emacs 23.
>
> If you are trying to track down the problem, you could first try to  
> see
> if the problem is occurring in Lisp or in the C code.  For instance,
> does scrolling in buffers trigger GCs?  Is there any difference in
> performance if you disable the tool-bar or other parts of the  
> graphical
> display?


I've run Shark over it (profiling tool).
For the Carbon port, it looks uneventful.
For NS /23, I get 24% time spent in mark_object and another 6% in  
garbage_collect.  [Does this indicate consing?]
The 16% in display_mode_lines would support what I observed regarding  
the header line (even though I thought the effect was more than that).

Note that I have (setq redisplay-dont-pause t), because otherwise it  
skips a lot of pages.  Note that it does that too when scrolling line  
by line; for the trace below, I scrolled page-wise.

Regarding display elements: the tool-bar doesn't matter, but the  
header line makes a big difference.  Using a simpler header line (no  
properties, no overlays) improves the speed.  But note that I've used  
the same header line in both Carbon/22 and NS/23.
Unfortunately there doesn't seem to be anything specific about the  
header line that causes the slowdown in NS/23, except that (setq  
header-line-format "Hello") speeds up the scrolling.  But even without  
header line do I see a marked regression compared to 22.



	0.0%	69.2%	Aquamacs	start	
	0.0%	69.2%	Aquamacs	 main	
	0.0%	69.2%	Aquamacs	  Frecursive_edit	
	0.0%	69.2%	Aquamacs	   recursive_edit_1	
	0.0%	69.2%	Aquamacs	    command_loop	
	0.0%	69.2%	Aquamacs	     internal_catch	
	0.0%	69.2%	Aquamacs	      command_loop_2	
	0.0%	69.2%	Aquamacs	       internal_condition_case	
	0.0%	69.2%	Aquamacs	        command_loop_1	
	0.0%	55.9%	Aquamacs	         read_key_sequence	
	0.0%	55.9%	Aquamacs	          read_char	
	0.0%	50.6%	Aquamacs	           redisplay_internal	
	0.0%	38.8%	Aquamacs	            redisplay_windows	
	0.0%	38.8%	Aquamacs	             internal_condition_case_1	
	0.0%	38.8%	Aquamacs	              redisplay_window_0	
	0.0%	38.8%	Aquamacs	               redisplay_window	
	0.0%	17.9%	Aquamacs	                try_window	
	0.1%	17.7%	Aquamacs	                 display_line	
	0.0%	16.2%	Aquamacs	                  get_next_display_element	
	0.1%	16.2%	Aquamacs	                   next_element_from_buffer	
	0.0%	15.5%	Aquamacs	                    handle_stop	
	0.0%	11.5%	Aquamacs	                     handle_fontified_prop	
	0.0%	11.5%	Aquamacs	                      safe_call1	
	0.0%	11.5%	Aquamacs	                       safe_call	
	0.0%	11.5%	Aquamacs	                        internal_condition_case_2	
	0.0%	11.5%	Aquamacs	                         Ffuncall	
	1.4%	6.0%	Aquamacs	                          Fgarbage_collect	
	0.0%	1.3%	Aquamacs	                           lisp_free	
	0.1%	0.7%	libSystem.B.dylib	                            free	
	0.5%	0.6%	libSystem.B.dylib	                             szone_free	
	0.1%	0.1%	libSystem.B.dylib	                               
tiny_free_list_add_ptr	
	0.0%	0.0%	libSystem.B.dylib	                              __spin_lock	
	0.0%	0.0%	libSystem.B.dylib	                               
dyld_stub__spin_lock	
	0.1%	0.1%	libSystem.B.dylib	                             szone_size	
	0.0%	0.0%	libSystem.B.dylib	                              
malloc_zone_free	
	0.5%	0.5%	Aquamacs	                            mem_find	
	0.0%	0.0%	Aquamacs	                            unexec_free	
	0.0%	1.2%	Aquamacs	                           mark_vectorlike	
	0.3%	1.1%	Aquamacs	                           mem_delete	
	0.0%	0.5%	Aquamacs	                           mark_object	
	0.0%	0.3%	Aquamacs	                            
balance_intervals_internal	
	0.1%	0.2%	Aquamacs	                           truncate_undo_list	
	0.0%	0.0%	Aquamacs	                           mark_stack	
	0.0%	0.0%	Aquamacs	                           lisp_align_free	
	0.0%	5.5%	Aquamacs	                          funcall_lambda	
	0.0%	0.0%	Aquamacs	                      Fget_char_property	
	0.0%	3.9%	Aquamacs	                     handle_face_prop	
	0.0%	0.0%	Aquamacs	                     handle_display_prop	
	0.0%	0.0%	Aquamacs	                     handle_invisible_prop	
	0.0%	0.0%	Aquamacs	                     handle_composition_prop	
	0.0%	0.0%	Aquamacs	                     get_overlay_strings	
	0.0%	0.3%	Aquamacs	                    composition_reseat_it	
	0.0%	0.3%	Aquamacs	                    compute_stop_pos	
	0.3%	0.7%	Aquamacs	                  x_produce_glyphs	
	0.0%	0.3%	Aquamacs	                  append_space_for_newline	
	0.1%	0.1%	Aquamacs	                  compute_line_metrics	
	0.0%	0.0%	libSystem.B.dylib	                  __memcpy	
	0.0%	0.0%	Aquamacs	                  handle_line_prefix	
	0.0%	0.0%	Aquamacs	                  set_iterator_to_next	
	0.0%	0.0%	Aquamacs	                  prepare_desired_row	
	0.0%	0.0%	Aquamacs	                  reseat_at_next_visible_line_start	
	0.0%	0.0%	Aquamacs	                  recenter_overlay_lists	
	0.0%	0.0%	Aquamacs	                  get_char_face_and_encoding	
	0.0%	0.1%	Aquamacs	                 start_display	
	0.0%	0.0%	Aquamacs	                 recenter_overlay_lists	
	0.0%	0.0%	Aquamacs	                 init_iterator	
	0.0%	0.0%	Aquamacs	                 append_space_for_newline	
	0.0%	16.1%	Aquamacs	                display_mode_lines	
	0.0%	4.4%	Aquamacs	                update_window_fringes	
	0.0%	0.2%	Aquamacs	                update_frame_tool_bar	
	0.0%	0.1%	Aquamacs	                set_vertical_scroll_bar	
	0.0%	0.0%	Aquamacs	                set_buffer_internal_1	
	0.0%	0.0%	Aquamacs	                reconsider_clip_changes	
	0.0%	10.3%	Aquamacs	            update_frame	
	0.0%	1.5%	Aquamacs	            prepare_menu_bars	
	0.0%	0.0%	Aquamacs	            echo_area_display	
	0.0%	0.0%	Aquamacs	            select_frame_for_redisplay	
	0.0%	0.0%	Aquamacs	            clear_window_matrices	
	0.0%	0.0%	Aquamacs	            clear_desired_matrices	
	0.0%	2.7%	Aquamacs	           sit_for	
	0.0%	1.2%	Aquamacs	           show_help_echo	
	0.0%	0.6%	Aquamacs	           safe_run_hooks	
	0.0%	0.5%	Aquamacs	           wait_reading_process_output	
	0.0%	0.2%	Aquamacs	           detect_input_pending_run_timers	
	0.0%	0.0%	Aquamacs	           read_avail_input	
	0.0%	0.0%	Aquamacs	          follow_key	
	0.0%	10.2%	Aquamacs	         call3	
	0.0%	3.0%	Aquamacs	         safe_run_hooks	
	0.0%	0.0%	Aquamacs	         adjust_point_for_property	
	0.0%	0.0%	Aquamacs	        cmd_error	
	0.0%	24.5%	Aquamacs	mark_object	
	0.0%	4.3%	Aquamacs	mark_vectorlike	
	0.6%	0.7%	mach_kernel	lo_alltraps	
	0.0%	0.5%	mach_kernel	lo_mach_scall	
	0.0%	0.2%	mach_kernel	i386_astintr	
	0.0%	0.1%	Aquamacs	traverse_intervals_noorder	
	0.0%	0.1%	mach_kernel	lo_unix_scall	
	0.0%	0.1%	Aquamacs	mark_buffer	
	0.0%	0.1%	Aquamacs	mark_interval_tree	
	0.0%	0.1%	mach_kernel	thread_continue	
	0.0%	0.0%	mach_kernel	IOWorkLoop::threadMain()	
	0.0%	0.0%	Aquamacs	Frecursive_edit	
	0.0%	0.0%	libSystem.B.dylib	thread_start	
	0.0%	0.0%	mach_kernel	thread_call_enter_delayed	
	0.0%	0.0%	Aquamacs	read_char	
	0.0%	0.0%	mach_kernel	ml_set_interrupts_enabled	
	0.0%	0.0%	mach_kernel	mach_msg_receive_continue	
	0.0%	0.0%	Aquamacs	display_mode_element	


[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 2193 bytes --]

  reply	other threads:[~2009-04-20 23:20 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-20 21:58 Low redisplay performance (23 regression) David Reitter
2009-04-20 22:31 ` Deniz Dogan
2009-04-20 22:33 ` Chong Yidong
2009-04-20 23:20   ` David Reitter [this message]
2009-04-21  3:15   ` Eli Zaretskii
2009-04-21 12:36     ` Juanma Barranquero
2009-04-21 13:51       ` David Reitter
2009-04-21 14:20         ` Juanma Barranquero
2009-04-21 18:58       ` Eli Zaretskii
2009-04-21 19:07         ` Eli Zaretskii
2009-04-21 23:24           ` Juanma Barranquero
2009-04-21 20:19         ` David Reitter
2009-04-21 20:53           ` Chong Yidong
2009-04-21 22:15             ` David Reitter
2009-04-22 15:30           ` Daniel Clemente
2009-04-22 15:50             ` David Reitter
2009-04-22 16:28               ` Chong Yidong
2009-04-22 18:26                 ` David Reitter
2009-04-23 13:34                   ` Willem Rein Oudshoorn
2009-04-23 22:45                     ` Miles Bader
2009-05-06 13:28                       ` Willem Rein Oudshoorn
2009-04-22 22:58             ` YAMAMOTO Mitsuharu
2009-04-23  1:01               ` ftx font driver [Re: Low redisplay performance (23 regression)] Kenichi Handa
2009-04-23  7:31                 ` YAMAMOTO Mitsuharu
2009-04-23 11:22                   ` Kenichi Handa
2009-04-23 12:38                     ` Chong Yidong
2009-04-23 14:56                       ` Stefan Monnier
2009-04-24  1:09                         ` Kenichi Handa
2009-04-24  2:01                           ` Stefan Monnier
2009-04-24  3:52                             ` Chong Yidong
2009-04-25 14:38                             ` Chong Yidong
2009-04-21 23:16         ` Low redisplay performance (23 regression) Juanma Barranquero
2009-04-21 14:56 ` William Xu
2009-04-21 15:30   ` David Reitter
2009-04-22 14:25     ` William Xu
2009-04-29 10:17 ` Tobias C. Rittweiler
2009-04-29 11:54   ` David Reitter
2009-04-29 13:33   ` Stefan Monnier
2009-04-29 17:35     ` Tobias C. Rittweiler
2009-04-29 20:20       ` Stefan Monnier
2009-04-30  7:34         ` Tobias C. Rittweiler
2009-04-30 20:00           ` Stefan Monnier
2009-04-30 20:34             ` Tobias C. Rittweiler
2009-04-29 18:01     ` Tobias C. Rittweiler
2009-04-29 17:40   ` Tassilo Horn
2009-04-29 17:49     ` David Reitter
2009-04-29 18:21       ` Tassilo Horn
     [not found]         ` <14FF0914-56BA-41D6-85DA-A4024694CF75@gmail.com>
2009-04-29 19:45           ` Tassilo Horn
2009-04-29 18:45       ` Chong Yidong
2009-04-30  2:46         ` YAMAMOTO Mitsuharu
2009-04-30  3:49           ` Chong Yidong
2009-04-30  6:27             ` YAMAMOTO Mitsuharu
2009-04-29 22:10       ` Miles Bader
2009-04-30  5:05     ` Chong Yidong
2009-04-30  7:53       ` Tobias C. Rittweiler
2009-04-30  9:37       ` Tassilo Horn
2009-04-30 12:44       ` David Reitter
2009-04-29 18:38 ` Dan Nicolaescu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=A463224E-D678-4B59-9093-703C4BEFE460@gmail.com \
    --to=david.reitter@gmail.com \
    --cc=cyd@stupidchicken.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).