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 15:36:58 +0300 Message-ID: <838s3ni2z9.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> <83o8cjikuj.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9771"; 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 14:37:46 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 1lps2E-0002GP-3O for ged-emacs-devel@m.gmane-mx.org; Sun, 06 Jun 2021 14:37:46 +0200 Original-Received: from localhost ([::1]:49996 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lps2C-0003SW-FP for ged-emacs-devel@m.gmane-mx.org; Sun, 06 Jun 2021 08:37:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:32872) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lps1T-0002gF-VA for emacs-devel@gnu.org; Sun, 06 Jun 2021 08:37:01 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:50002) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lps1T-0007ZC-4f; Sun, 06 Jun 2021 08:36:59 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4911 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 1lps1S-00039Z-O0; Sun, 06 Jun 2021 08:36:59 -0400 In-Reply-To: (message from Dmitry Gutov on Sun, 6 Jun 2021 15:00:50 +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:270479 Archived-At: > Cc: wyuenho@gmail.com, emacs-devel@gnu.org > From: Dmitry Gutov > Date: Sun, 6 Jun 2021 15:00:50 +0300 > > > 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? > > No, I'm not measuring while idle. Like I said, those redisplays are in > the middle of the "complex" scenario mentioned previously. Then I don't see how this is relevant to the issue with the GTK tool bar making "do-nothing" redisplays more expensive. The above is a completely different scenario; depending on what exactly was Emacs doing in this scenario, redrawing of the GTK tool bar could indeed account for an insignificant percentage of the CPU time. > Since the code path that calls (redisplay) in Company is only triggered > when talking to an external process (or, more generally, when the > backend does something that allows a timer to run), to test this I > repeatedly exercise completion using an external service, talking to it > via HTTP/JSON. And what are you trying to investigate or establish with profiling this scenario? Maybe I simply don't understand what you wanted to demonstrate. > >> 0,25% emacs emacs [.] json_to_lisp > > > > Any idea why this is here? > > ...so both JSON decoding and GC being among the hot spots are totally > expected. Sure.