From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: How to measure frame rate in fps? Date: Sun, 06 Jun 2021 09:11:00 +0300 Message-ID: <83o8cjikuj.fsf@gnu.org> References: <83h7ih24kc.fsf@gnu.org> <83y2btzlui.fsf@gnu.org> <4fe7f7a7-7c23-25fc-2d59-f1290436f487@yandex.ru> <83sg21zjg0.fsf@gnu.org> <472fab69-c072-74d4-e8d2-0dcefab7f726@yandex.ru> <834kehyp6s.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16442"; mail-complaints-to="usenet@ciao.gmane.io" Cc: wyuenho@gmail.com, emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jun 06 08:11:52 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lpm0l-0003zV-Cy for ged-emacs-devel@m.gmane-mx.org; Sun, 06 Jun 2021 08:11:51 +0200 Original-Received: from localhost ([::1]:59828 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lpm0j-0001ZM-VD for ged-emacs-devel@m.gmane-mx.org; Sun, 06 Jun 2021 02:11:50 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43456) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lplzz-0000uU-KG for emacs-devel@gnu.org; Sun, 06 Jun 2021 02:11:03 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:43326) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lplzy-0000Uk-RV; Sun, 06 Jun 2021 02:11:02 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4937 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lplzy-0003T0-1w; Sun, 06 Jun 2021 02:11:02 -0400 In-Reply-To: (message from Dmitry Gutov on Sun, 6 Jun 2021 05:09:09 +0300) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:270461 Archived-At: > Cc: wyuenho@gmail.com, emacs-devel@gnu.org > From: Dmitry Gutov > Date: Sun, 6 Jun 2021 05:09:09 +0300 > > On 02.06.2021 05:29, Eli Zaretskii wrote: > > Maybe run Emacs under 'perf' and see which GTK API call(s) take(s) > > most of those milliseconds? > > I'm not sure if I've been doing it right, but the gtk functions seem to > be taking pretty much none of the runtime: > > 0,00% emacs libgtk-3.so.0.2404.16 [.] gtk_widget_get_direction > 0,00% emacs libgtk-3.so.0.2404.16 [.] gtk_widget_get_type > > 0,00% emacs libgtk-3.so.0.2404.16 [.] gtk_style_context_get_property > 0,00% emacs libgtk-3.so.0.2404.16 [.] gtk_get_event_widget > 0,00% emacs libgtk-3.so.0.2404.16 [.] gtk_style_context_get_type > 0,00% emacs libgtk-3.so.0.2404.16 [.] gtk_toolbar_get_type Yes, looks like that. Strange, since you did say disabling the tool bar makes a prominent difference. > The leaders looked like: > > 28,52% emacs emacs [.] mark_object > > 6,87% emacs emacs [.] assq_no_quit > > 3,45% emacs emacs [.] mark_char_table > > 3,37% emacs emacs [.] sweep_strings > > 2,84% emacs emacs [.] boyer_moore Three out of 5 of the above mean Emacs spends a large proportion of the time (35%) doing GC. I'm not sure I understand why should Emacs perform GC while being idle: do you have some timers running, perhaps? If this is "emacs -Q", what happens if you disable blink-cursor-mode and global-eldoc-mode? > 0,25% emacs emacs [.] json_to_lisp Any idea why this is here? (I think "perf report" supports output in the form of a call-tree, where functions are shown with their callers? That allows to better understand what high-level processing is running in Emacs than just looking at the profile sorted by percents.)