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 18:00:35 +0300 Message-ID: <4fe7f7a7-7c23-25fc-2d59-f1290436f487@yandex.ru> References: <83h7ih24kc.fsf@gnu.org> <83y2btzlui.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="30957"; 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 Tue Jun 01 17:03:10 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 1lo5vC-0007wF-4O for ged-emacs-devel@m.gmane-mx.org; Tue, 01 Jun 2021 17:03:10 +0200 Original-Received: from localhost ([::1]:39794 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lo5vB-0004Ft-3H for ged-emacs-devel@m.gmane-mx.org; Tue, 01 Jun 2021 11:03:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36036) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lo5sp-0001dW-VG for emacs-devel@gnu.org; Tue, 01 Jun 2021 11:00:43 -0400 Original-Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]:45985) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lo5sm-0001wu-Me; Tue, 01 Jun 2021 11:00:43 -0400 Original-Received: by mail-wm1-x333.google.com with SMTP id s5-20020a7bc0c50000b0290147d0c21c51so2108634wmh.4; Tue, 01 Jun 2021 08:00:39 -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=f0IFMuH58wjz81ZB6aI28/KPCcAgffjOi2UWGBohH6s=; b=r4WvLj8OcAnkCOTdDb5cgFZFCZpcEs+tE1QrJro6Hqwjlt4Ov7Ti0qY0HfvW3YNNX1 YFhJX0Mt1NQrdW4mMIjIya3ttBDPEyLBO8DNYRK6WtMIWoywgQhhVb80/tj7lyZarQmR AsNONxeOgN5yekq7PLh3XcaJSYrXjNiIkVL/kpr7GU/7R4REzhe/n5ohQRc0pSLmPdcW A/mIWjjBT2QFhSze3YvyPWYWltK/U809mSzboQzZGZD3AIIQNm1QMANwBhp1FlW8Mbg2 5JfMB3gKCvpeabOqCsIeJ85QxheKFjTTHutH0qooltyMXVcU/M6H6DDc18FNNia6V2/P gPwA== 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=f0IFMuH58wjz81ZB6aI28/KPCcAgffjOi2UWGBohH6s=; b=hn5LeKdMHXwKVLiDHlxDCV1KzzzniRg692tMCmsaoHRoXvHF05X2aQ8vkkMGiqa14j N+jo3G5eHZvQXPOzeCmMMmyZF3j7VjJyf3LQKh2bPomq8qxNzpDV+QaG3I1paGzuqI21 z9huBZhu2L4sQOW17Xt1HHydLavDEbbYODsF5IV3KALFZsFx9bYjsHLL+k50ZZa0g+4g B0pXxXGgcMvI4TukbvWPxedKzeZTRmQxlzFrw31n+4ZcN9iAUlAKhgJU4WJgAWraLrvs rnR3nC5RSG/U6VumArYjjv0egS44C8aU76ibraAByHMvFgcaeoaK1T28BYroL3IuSwCN DSIw== X-Gm-Message-State: AOAM530X8F8a9CRphz9eN7okcjTPdGCHFBX9JUkobIBp9nkbxBqn2xSK IAIWknxKVqhFJ9nnHyPmueSHxvpysR0= X-Google-Smtp-Source: ABdhPJwVGidi7XhIkRp9aPTkKYtKHich19+zRS+5RhiyPANJySOG4m6JA9ZqvbVt243syJG6TucrAg== X-Received: by 2002:a1c:4482:: with SMTP id r124mr363236wma.42.1622559638880; Tue, 01 Jun 2021 08:00:38 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id e8sm3543967wrt.30.2021.06.01.08.00.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 01 Jun 2021 08:00:37 -0700 (PDT) In-Reply-To: <83y2btzlui.fsf@gnu.org> Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=raaahh@gmail.com; helo=mail-wm1-x333.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:270202 Archived-At: On 01.06.2021 17:43, Eli Zaretskii wrote: > I know very little about the cost of the GTK tool bar redrawing: the > code is in gtkutil.c, and it's full of GTK API calls. Maybe the above > times are explained and justified by that, I don't know. Sometimes the times are high like this, sometimes they are lower. Could be it's another GTK bug, and there's nothing we can do, but it's probably a bug *somewhere*. > I also am not sure the above faithfully reflects what happens in Real > Life when Emacs has nothing to redisplay: I think you get the tool-bar > redisplay triggered because the evaluation of the benchmark call > causes it somehow. How did you evaluate it, exactly? Either using M-:, or with M-x benchmark like you suggested (only without prefix argument, to measure just 1 iteration). The results are similar. >> Not so noticeable if it just happens once, but easily affects the >> performance of code which performs "virtual" redisplay, such as >> posn-at-point. > > How do you deduce that posn-at-point triggers redisplay of the GTK > tool bar? It shouldn't, AFAIR. posn-at-point and its ilk only > simulate display of text, they don't care about window's and frame's > decorations. You're right, posn-at-point shows me different timings. Often enough as high as 12-15ms, which is not great for a low latency display, but the numbers don't seem to be tied to tool-bar-mode being on. But we end up calling `redisplay` explicitly on a different code path in Company (when a backend talks to an external process, basically), so it's still affected by how long that takes.