From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: How to measure frame rate in fps? Date: Sun, 6 Jun 2021 15:00:50 +0300 Message-ID: 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> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31659"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 Cc: wyuenho@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jun 06 14:01:47 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 1lprTN-00080S-Fd for ged-emacs-devel@m.gmane-mx.org; Sun, 06 Jun 2021 14:01:45 +0200 Original-Received: from localhost ([::1]:60968 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lprTM-0006S7-D7 for ged-emacs-devel@m.gmane-mx.org; Sun, 06 Jun 2021 08:01:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55636) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lprSd-0005hg-TF for emacs-devel@gnu.org; Sun, 06 Jun 2021 08:01:01 -0400 Original-Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]:35382) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lprSY-000228-WD; Sun, 06 Jun 2021 08:00:58 -0400 Original-Received: by mail-wm1-x336.google.com with SMTP id k5-20020a05600c1c85b02901affeec3ef8so364082wms.0; Sun, 06 Jun 2021 05:00:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=N2Xvqd3ibJRRZQS1qDUMvS33K4XuLcqNGWMCMGIgVAs=; b=MyEbFog7XJO2EeVRQGIbOH4S7TT+qwBvHbXrbWnqNfCY9ynp+ycNe6XoW1/SdMLK2S AbeTuLjPXeUoWfGZDbHdOLKrydv1xCWx+6SGiF/uPIjyfHvgQoSGMYAN0/aGV4uojqMm clBDv6cwa5W+OLSHEsRo2rYDqahblystgTJ541b4roMs+iU/ohOEWOIggA+cSdomGydD BCwd4wi/6ZwAkdTUNhbpJrsKjqnKl9bCNvXdtYEAoirY5VFUMztS/cJVNwhGAqkJ1Vq2 0LPPch1ORq4+DoigVc9epJ5HQ7KnmRV5aHtLmvPcAMWQXRYGN1J83mHaN51+ZGESPfbK xzGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=N2Xvqd3ibJRRZQS1qDUMvS33K4XuLcqNGWMCMGIgVAs=; b=gBBqN7Z9Fros3vPmV/VyFaEIc4R4udbivApRJ6PxEpm7Sfv9N5kl/2bcgt3WmCcVnL RcNljLopsfgeFxAcXNkdZeTI21ogWi85BNyfeOqNgph8U1m1bdCKf06ch1LEIdidRwUG GWO4BLSYQv4OuFPtGYtbWIJjto8/2bnBzw2cz/f28dx23AltUAx7IuTDfGQK0Puy9WBp JHUOksiY0SHA6JJOfEMba1WIVLEcYHpw4RlKfgowIV23i2w0x4PrxaQ4/YMP5KS5znjz tv5N5w1NMXvtlM7eqql2FaRHsRrMaztUjSkOzFOkNFqZ5yV5O5Bj/gLVObS1ZyVYrji/ AMFw== X-Gm-Message-State: AOAM530VxKauzXqWg/gLz3VjZL5182y2sw8xNtZAhRpkqRacc/oP5+yR UDZ5MC52JxCNbf4nwaq178aTE8rrjnw= X-Google-Smtp-Source: ABdhPJwV+iDtYFO3lXtTlAB/WCo9OFodZ0EY4QSlDH6WkhkVbAcCD1WUms0ggcTd/xYxgx5alzwCkQ== X-Received: by 2002:a7b:c193:: with SMTP id y19mr12542788wmi.172.1622980852711; Sun, 06 Jun 2021 05:00:52 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id q5sm10787013wmc.0.2021.06.06.05.00.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 06 Jun 2021 05:00:51 -0700 (PDT) In-Reply-To: <83o8cjikuj.fsf@gnu.org> Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=raaahh@gmail.com; helo=mail-wm1-x336.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.248, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action 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:270475 Archived-At: On 06.06.2021 09:11, Eli Zaretskii wrote: >> 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. A noticeable difference in the speed of (redisplay), as measured by benchmark-progn, in the middle of a more complex process. >> 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? No, I'm not measuring while idle. Like I said, those redisplays are in the middle of the "complex" scenario mentioned previously. 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. >> 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. > (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.) Let me know if you still need some of the calls expanded this way.