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: Mon, 7 Jun 2021 02:31: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> <838s3ni2z9.fsf@gnu.org> <1fe36d16-202a-9c00-7a17-946226ad8e0f@yandex.ru> <83sg1uhpw2.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="19017"; 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 Mon Jun 07 03:26:29 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 1lq428-0004bf-5i for ged-emacs-devel@m.gmane-mx.org; Mon, 07 Jun 2021 03:26:28 +0200 Original-Received: from localhost ([::1]:50852 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lq427-0006Gp-3z for ged-emacs-devel@m.gmane-mx.org; Sun, 06 Jun 2021 21:26:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45072) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lq3wT-0004N8-Tn for emacs-devel@gnu.org; Sun, 06 Jun 2021 21:20:38 -0400 Original-Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]:38898) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lq3wS-0000TH-3x; Sun, 06 Jun 2021 21:20:37 -0400 Original-Received: by mail-ed1-x52d.google.com with SMTP id d13so4690661edt.5; Sun, 06 Jun 2021 18:20:35 -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=JDTB5sHNMGB7zP5Li0Zhrp87hmWM4nUqY2U3kk9hahk=; b=MvDeu6MrGQrSUFXXl7s8YvbEBvEeIo6oFsfk31Pe9rYGjMdAOti44oIoqGpQ9A75Uj 24fzzwjape9FMmf5oYKzAMArAqytGAStXSzCdhId2HhFwMlBGjL4rq0qLOONK8Xs+Oon 6XDpjif6d/XzD2sQ+rTCcn66XiH4Ig7mGCP2zlLICk65vDMEXZceu8LVwj08cknO8XJs nljkzs5Px93k0rPqzvHzuf0eEKeqh38tASrQn9GOw2rtMM7YEBQnNeszH8SPNV30egdK fhVb9oqUN6o76RxzhvaSI906GBjjMpKJngHMocIFpBro9jucza2YQnvDUbZYSIr/8CpI EdQw== 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=JDTB5sHNMGB7zP5Li0Zhrp87hmWM4nUqY2U3kk9hahk=; b=go9h0YEOx1uzbXwg4B3jf9OSC4+TZW8tQtQgvfBSCj9C0T6YDfJXO25h0CFxAW2yMz IVhM6UUf1971rOf0CROIXSMtpGr9dleKJHluqOhkCkHqp8ahPs8A49JQY+RETSpiKLEy 4zPe6JsRFvYHvFR6cAmh7UA6LuT+wZgWoqSmunUf3zEWeT0plWOKPxtFYT+YwPxfU5So tZJ1WoMHF6WIxA3PRcqpIBPJlLMN+hFhlpcAXuGV9J9T6qXMD5PFyN9aSoYotiGTeDl7 UOzvH5k47vTU9YVtBcAp0IZrgZGZ+WUzs01mLccyYjJf5W3PmMY8m0dotJfOBaSz7a2u nBaw== X-Gm-Message-State: AOAM533q3xAfpkx0mRr0BKfnnzRRoHPxrkMtOKi2xE2L5h3T97NbBvwy LExzHJi79r7J726KCY1T1QRNYxLrpt8= X-Google-Smtp-Source: ABdhPJwiOpGKgMQiNt0CEY1AT2uOM+lGxd+xUcSZcRl7qZgW7bKRCGK03PT3S+yY+xA+3wBb8eEyjg== X-Received: by 2002:a5d:4d05:: with SMTP id z5mr13955266wrt.127.1623022312924; Sun, 06 Jun 2021 16:31:52 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id j34sm7314147wms.7.2021.06.06.16.31.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 06 Jun 2021 16:31:52 -0700 (PDT) In-Reply-To: <83sg1uhpw2.fsf@gnu.org> Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::52d; envelope-from=raaahh@gmail.com; helo=mail-ed1-x52d.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.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, FREEMAIL_REPLY=1, 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:270510 Archived-At: On 06.06.2021 20:19, Eli Zaretskii wrote: >> Cc: wyuenho@gmail.com, emacs-devel@gnu.org >> From: Dmitry Gutov >> Date: Sun, 6 Jun 2021 19:48:17 +0300 >> >> On 06.06.2021 15:36, Eli Zaretskii wrote: >> >>> 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. >> >> In my scenario the observable window configuration doesn't change >> between redisplays (though, of course, "current buffer" is switched >> multiple times under the covers, to send request and parse/receive >> response), and the values of point (again, during redisplay), are only 1 >> character position apart. > > First, that nothing changes on the glass doesn't mean redisplay isn't > working, because it isn't (always) omniscient. Of course. > More importantly, I no longer understand what are we discussing. > AFAIU, you have some scenario where Emacs is performing some > non-trivial processing, and where in your opinion redisplay should not > have changed anything on display. Is that correct? If so, please > take me from this point and explain what is the issue you see. I have one scenario, which I run with toolbar disabled, then enabled, then disabled, then enabled again. With a (benchmark-progn ...) wrapped around a (redisplay) call, to note how long it really takes in practice. I'm saying that the buffer, or other window configuration, don't change at those points, so the toolbar likely doesn't need to be re-rendered, and so the extra overhead is surprising. And that the toolbar taking 10-15ms to re-render isn't great either in any case. >> So if there is some caching of the toolbar contents, I don't see why it >> wouldn't work. I'm also not sure how rendering it can take 10-15 extra >> milliseconds, but for all I know this could be normal. > > The 10-15 milliseconds was measured in a different situation, AFAIU: > an idle "emacs -Q". Is that correct? It's the difference, computed very roughly. Let me show you the contents of the Messages buffer. The times printed are reported by the (benchmark-progn (redisplay)) form: Elapsed time: 0.000250s Elapsed time: 0.020975s Elapsed time: 0.021575s Elapsed time: 0.018466s Elapsed time: 0.019960s Elapsed time: 0.019763s Elapsed time: 0.018882s Elapsed time: 0.017270s Elapsed time: 0.021255s Elapsed time: 0.008013s Elapsed time: 0.027652s Elapsed time: 0.025234s Elapsed time: 0.016007s Elapsed time: 0.020156s Elapsed time: 0.019670s Elapsed time: 0.016077s Elapsed time: 0.009564s Elapsed time: 0.007729s Elapsed time: 0.010654s Elapsed time: 0.015931s Elapsed time: 0.005864s Tool-Bar mode enabled Elapsed time: 0.002618s Elapsed time: 0.029224s Elapsed time: 0.012488s Elapsed time: 0.035648s Elapsed time: 0.034038s Elapsed time: 0.029158s Elapsed time: 0.032658s Elapsed time: 0.031887s Elapsed time: 0.034134s Elapsed time: 0.032638s Elapsed time: 0.033091s Elapsed time: 0.033695s Elapsed time: 0.032838s Elapsed time: 0.023070s Elapsed time: 0.033654s Elapsed time: 0.016566s Elapsed time: 0.028871s Elapsed time: 0.012279s Elapsed time: 0.026500s Elapsed time: 0.027658s Elapsed time: 0.032699s Elapsed time: 0.013483s Elapsed time: 0.030350s Elapsed time: 0.030031s Elapsed time: 0.045297s Elapsed time: 0.025866s Elapsed time: 0.032220s Elapsed time: 0.012934s Elapsed time: 0.032216s Elapsed time: 0.031713s Elapsed time: 0.030811s Elapsed time: 0.013024s Elapsed time: 0.032237s Elapsed time: 0.012812s Elapsed time: 0.021457s Elapsed time: 0.025366s Elapsed time: 0.032519s Elapsed time: 0.025441s Elapsed time: 0.031464s Elapsed time: 0.012804s Elapsed time: 0.012951s Elapsed time: 0.034065s Elapsed time: 0.032018s Elapsed time: 0.033917s Elapsed time: 0.030410s Elapsed time: 0.012490s Elapsed time: 0.034950s Elapsed time: 0.032683s Elapsed time: 0.012379s Elapsed time: 0.017438s Elapsed time: 0.036289s Mark set Quit Tool-Bar mode disabled Elapsed time: 0.000336s Elapsed time: 0.004768s Elapsed time: 0.018090s Elapsed time: 0.016751s Elapsed time: 0.015772s Elapsed time: 0.006628s Elapsed time: 0.017676s Elapsed time: 0.015837s Elapsed time: 0.021333s Elapsed time: 0.019190s Elapsed time: 0.018478s Elapsed time: 0.018915s Elapsed time: 0.014479s Elapsed time: 0.005889s Elapsed time: 0.022493s Elapsed time: 0.011403s Elapsed time: 0.011022s Elapsed time: 0.020275s Elapsed time: 0.006469s Elapsed time: 0.019499s Elapsed time: 0.005800s Elapsed time: 0.004827s Elapsed time: 0.008394s Elapsed time: 0.029546s Elapsed time: 0.007446s Elapsed time: 0.008475s Elapsed time: 0.008290s Elapsed time: 0.000402s Elapsed time: 0.004851s Elapsed time: 0.019022s Elapsed time: 0.020623s Elapsed time: 0.005188s Elapsed time: 0.021102s Elapsed time: 0.019203s Elapsed time: 0.005724s Elapsed time: 0.019243s Elapsed time: 0.018614s Elapsed time: 0.021920s Elapsed time: 0.019716s Tool-Bar mode enabled Elapsed time: 0.002532s Elapsed time: 0.013393s Elapsed time: 0.011731s Elapsed time: 0.033731s Elapsed time: 0.012756s Elapsed time: 0.030029s Elapsed time: 0.011511s Elapsed time: 0.033465s Elapsed time: 0.022545s Elapsed time: 0.023758s Elapsed time: 0.019158s Elapsed time: 0.015410s Elapsed time: 0.039764s Elapsed time: 0.034458s Elapsed time: 0.033955s Elapsed time: 0.029793s Elapsed time: 0.016531s Elapsed time: 0.034445s Elapsed time: 0.024124s Elapsed time: 0.029344s Elapsed time: 0.016216s Elapsed time: 0.031835s Elapsed time: 0.018600s Elapsed time: 0.026698s Elapsed time: 0.013067s Elapsed time: 0.029260s Elapsed time: 0.029213s Elapsed time: 0.013516s Elapsed time: 0.032331s Quit [2 times]