From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Reitter Newsgroups: gmane.emacs.devel Subject: Re: Low redisplay performance (23 regression) Date: Mon, 20 Apr 2009 19:20:23 -0400 Message-ID: References: <4870CC42-A08E-4BE9-B566-0F4DA7AB0B74@gmail.com> <873ac3arbf.fsf@cyd.mit.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v930.3) Content-Type: multipart/signed; boundary=Apple-Mail-23--30581729; micalg=sha1; protocol="application/pkcs7-signature" X-Trace: ger.gmane.org 1240269676 29737 80.91.229.12 (20 Apr 2009 23:21:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 20 Apr 2009 23:21:16 +0000 (UTC) Cc: Emacs-Devel devel To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 21 01:22:35 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Lw2oO-0002g8-3k for ged-emacs-devel@m.gmane.org; Tue, 21 Apr 2009 01:22:06 +0200 Original-Received: from localhost ([127.0.0.1]:49517 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lw2mz-0004Hz-1R for ged-emacs-devel@m.gmane.org; Mon, 20 Apr 2009 19:20:37 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lw2mu-0004Hg-69 for emacs-devel@gnu.org; Mon, 20 Apr 2009 19:20:32 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lw2mp-0004Ft-EG for emacs-devel@gnu.org; Mon, 20 Apr 2009 19:20:31 -0400 Original-Received: from [199.232.76.173] (port=50829 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lw2mp-0004Fm-9p for emacs-devel@gnu.org; Mon, 20 Apr 2009 19:20:27 -0400 Original-Received: from mail-qy0-f116.google.com ([209.85.221.116]:41718) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Lw2mo-0000IM-OS for emacs-devel@gnu.org; Mon, 20 Apr 2009 19:20:27 -0400 Original-Received: by qyk14 with SMTP id 14so4038603qyk.14 for ; Mon, 20 Apr 2009 16:20:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:cc:message-id:from:to :in-reply-to:content-type:mime-version:subject:date:references :x-mailer; bh=pTUehdyf4/38c872B6u3GJc2lui5DGRLoevRPfZicdI=; b=lNtX3FZu93rNTsqOrfprl6OUrqu+22x/F1GZJ5Sty1JjI1mXeXQAHQDvOv8SKHLDLW XIg2iUwsiJRBw4exG4XWPfrNKkf1KVy7txQeRsrw4URBQmaRYGw/aTJK5+iOw7/pHZgK BMGOsY1T1n5q8X+/nOgDMr0VSdLfxwYkjvI0s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=cc:message-id:from:to:in-reply-to:content-type:mime-version:subject :date:references:x-mailer; b=nzlmY9yYvpIUgxVzPM8bm8zAoulcfrTMAffNZwbcytZuxOZySuTOYH/MJVSMHI2QZY 4fCS8hwtWgzfI+HtoBBj/XyXz15NNW5qjNZoARGSSFcY468xUaakKrlx7Gurk3ymt+Em 519sKp3wtXkc4J11/qPvwMnzywstv63RZXyew= Original-Received: by 10.224.11.1 with SMTP id r1mr7052793qar.359.1240269626155; Mon, 20 Apr 2009 16:20:26 -0700 (PDT) Original-Received: from scarlett.local (pool-72-65-195-138.pitbpa.east.verizon.net [72.65.195.138]) by mx.google.com with ESMTPS id 5sm6479959qwg.7.2009.04.20.16.20.24 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 20 Apr 2009 16:20:25 -0700 (PDT) In-Reply-To: <873ac3arbf.fsf@cyd.mit.edu> X-Mailer: Apple Mail (2.930.3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:110380 Archived-At: --Apple-Mail-23--30581729 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit On Apr 20, 2009, at 6:33 PM, Chong Yidong wrote: > David Reitter 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 --Apple-Mail-23--30581729 Content-Disposition: attachment; filename=smime.p7s Content-Type: application/pkcs7-signature; name=smime.p7s Content-Transfer-Encoding: base64 MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIFxDCCAn0w ggHmoAMCAQICED6shx13jEDrq0eL8FRq5ykwDQYJKoZIhvcNAQEFBQAwYjELMAkGA1UEBhMCWkEx JTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQdHkpIEx0ZC4xLDAqBgNVBAMTI1RoYXd0ZSBQ ZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENBMB4XDTA4MTIwOTAyMDgwMVoXDTA5MTIwOTAyMDgw MVowYjEQMA4GA1UEBBMHUmVpdHRlcjEOMAwGA1UEKhMFRGF2aWQxFjAUBgNVBAMTDURhdmlkIFJl aXR0ZXIxJjAkBgkqhkiG9w0BCQEWF2RhdmlkLnJlaXR0ZXJAZ21haWwuY29tMIGfMA0GCSqGSIb3 DQEBAQUAA4GNADCBiQKBgQDOdo6kAwlkBxUb8dj4saMbYg4SVng8CUePFn3cjjWrakBTbUVa4Z0n wlUxr7AitEeKhBy5nGhu96+jKUPrCwYNRCZ0l2ovvuGq4z1m1nZ5/c8WvFlVhieuxXMUfmb/O7D3 IojoX6i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