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: Tue, 1 Jun 2021 17:18:09 +0300 Message-ID: References: <83h7ih24kc.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="9670"; 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: emacs-devel@gnu.org To: Eli Zaretskii , Jimmy Yuen Ho Wong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jun 01 16:21:13 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 1lo5GZ-0002Jf-Ge for ged-emacs-devel@m.gmane-mx.org; Tue, 01 Jun 2021 16:21:11 +0200 Original-Received: from localhost ([::1]:42514 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lo5GY-0007og-52 for ged-emacs-devel@m.gmane-mx.org; Tue, 01 Jun 2021 10:21:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54102) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lo5Dm-00049e-I3 for emacs-devel@gnu.org; Tue, 01 Jun 2021 10:18:18 -0400 Original-Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:39631) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lo5Dk-0007gp-6X; Tue, 01 Jun 2021 10:18:18 -0400 Original-Received: by mail-wr1-x42c.google.com with SMTP id l2so7054411wrw.6; Tue, 01 Jun 2021 07:18:13 -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=ePT/vn8iFlNAcAt1Ei/4ut3YtiOUX3v4LZGjMebYWhk=; b=IZM5hKU5aU822oJYjI+nqYTXoufc3hzSGmmukXevUin6KadFnN/2mIul8P3wASwWtA /keEp3aORISndQj4OhOO/JqR6OMN/dUVaIvvuAXOEnKI0xGFYJHUVRJGM/OZa5VSHFea BzabVRz4OCsnFFACzbrcjp4COSk/eGlw89lr7CW6KyPDMaBCR3Rb+/ytcvTdw/qL/L/d vaz7jrKME/ANWf+w9BxRwyFMwmU749rf1pxnBkVwsBFYcpmxl3TXUZrHxh1+77/izZvn 0z7DGK1sjy8f7yXk6z/ZVdrvhRgQuwsDO3h69lXMkcy9xQ9rsHjpeexN42eJ0O1w0kJN C08g== 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=ePT/vn8iFlNAcAt1Ei/4ut3YtiOUX3v4LZGjMebYWhk=; b=TQtOWp+uQV++/7gAd6gI3eVkbrnBxzUMSUauTmRe+cbW+yKMKzzR3JQIb7XF36NjdB Euk47WeUh9LoyEoVlSXDl3PwSs+GLbvR+WKeMbKOTwKMCqKJh6L8IouYFdltZ3dZZeHu ZIzSfU1angooMzWwlNDbxgDnu/WHZS+TohbsQiuwzIIyRiOFE51dOCeLmmWVglNIcNwn Nn1xQNfXjKQe/nykivlt3e9zpp9wSoM30/uohd9yH+qj4CeXXMCWuAxv3R4knbEnGJeW jeXWiwGh0bT1H3ppiiIAEkonKUjXFCQvjmpASu6Q8LgKh/VuWVA3jDYWmjjROW8UcXJO mxtA== X-Gm-Message-State: AOAM532NwxQv6goHLXZ+cbocqBiwzXk6xQ3DhadlTk1hMC09VheTmHmq g4FKqUtY6IoJMX6Qlu/9h8pkJNcTbn0= X-Google-Smtp-Source: ABdhPJzZaIVwJAK+/6fKgvf7y9P81U+KnvvApBg3TeUmQm2iWIhFbDhiM0j5GL22OfR5B3sSzc7voA== X-Received: by 2002:adf:c392:: with SMTP id p18mr7270461wrf.373.1622557092262; Tue, 01 Jun 2021 07:18:12 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id a16sm3256196wrw.62.2021.06.01.07.18.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 01 Jun 2021 07:18:11 -0700 (PDT) In-Reply-To: <83h7ih24kc.fsf@gnu.org> Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=raaahh@gmail.com; helo=mail-wr1-x42c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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.249, NICE_REPLY_A=-0.613, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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:270194 Archived-At: On 01.06.2021 14:43, Eli Zaretskii wrote: > You just need to remember to include some command that > would affect the display, or else redisplay will do very little and > redraw nothing. Speaking of redisplay redrawing nothing, as long as tool-bar-mode is on, my GTK3 build (with -Q even) evaluates (benchmark 1 '(redisplay)) to a sequence of results like this: Elapsed time: 0.040924s Elapsed time: 0.026343s Elapsed time: 0.023473s Elapsed time: 0.025162s Elapsed time: 0.030074s Elapsed time: 0.041305s (0.026917s in 1 GCs) Elapsed time: 0.031169s Elapsed time: 0.020957s Elapsed time: 0.034885s Elapsed time: 0.035338s Elapsed time: 0.030864s and with tool-bar-mode off: Elapsed time: 0.007189s Elapsed time: 0.006181s Elapsed time: 0.007358s Elapsed time: 0.004177s Elapsed time: 0.007754s Elapsed time: 0.007557s Not so noticeable if it just happens once, but easily affects the performance of code which performs "virtual" redisplay, such as posn-at-point. Sometimes the effect disappears (even with tool-bar-mode on), but to bring it back I only had to call (redisplay t) once.