From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Herman=2c_G=c3=a9za?= Newsgroups: gmane.emacs.devel Subject: Rendering performace vs. line-spacing Date: Fri, 8 Jan 2021 12:34:53 +0100 Message-ID: <5f7dd7c3-ec7d-ffd5-76af-1a5ee5177d07@gmail.com> 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="23090"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.1 To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jan 08 12:36:30 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 1kxq4E-0005vd-Io for ged-emacs-devel@m.gmane-mx.org; Fri, 08 Jan 2021 12:36:30 +0100 Original-Received: from localhost ([::1]:55914 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kxq4D-000094-J2 for ged-emacs-devel@m.gmane-mx.org; Fri, 08 Jan 2021 06:36:29 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42512) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kxq2m-0007s7-3z for emacs-devel@gnu.org; Fri, 08 Jan 2021 06:35:01 -0500 Original-Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]:35133) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kxq2j-0003An-AX for emacs-devel@gnu.org; Fri, 08 Jan 2021 06:34:59 -0500 Original-Received: by mail-ed1-x52d.google.com with SMTP id u19so10917228edx.2 for ; Fri, 08 Jan 2021 03:34:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:subject:message-id:date:user-agent:mime-version :content-transfer-encoding:content-language; bh=QLki6bTtwedD/MLJfKRK8rUkImgfnWv2jhtDKw2jUyk=; b=C+QZScB6r0eprSZCLjrfSuYDJX2AYemfbgQrXHGt5VYN4WUsyrTb0ehbJi4IK3WyKD hbKTNBOynAwluRXrDCWMJ6vUWHs+RuYE1+Kde0gXmCABkKJ1LmHIDoqXPz/hS5yPQh48 Kg+pkXPaYVcvshFRoLOZdJkECDg0x0edbvb6MaWDPS5G1hBO0HUHFze2CSqZzmOb3cVD w/6W0mq1v8V+yxRv4g+JrvSs57IUJocM2DlDVkysY5R1XoWqlp4DVa9/VPzf6QJacDUc 8hKeMjN+RQzsMaL+gKo7KAGH3zSl6KYkmJracNS02zIXzwCQ3tIDGCgu43C6BM25GBH8 zj+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-transfer-encoding:content-language; bh=QLki6bTtwedD/MLJfKRK8rUkImgfnWv2jhtDKw2jUyk=; b=mkSNWUYLq1UwsFbeduwfAcTNtZdQQ3ySfSpsI7+ljxmhk/5/HpFeKiSUZYT7l8nZJB gBf6ocGrQr/L1LqAga1Q/zaMAY9IP+o/7XMbQUYUqvmz9aXu4BFBW4LFwHb015WiXE9J FS1gDhfewmmOtfKP57r95aDrUOhDHyxmQJ+jTGEpGvlw62x4wX56QE9/UUap7BJwypCR PICYG4iKrdYcCCp/ujx2CDwTuRIWOO+s7NdYQUBO8jHH7V1w0sg3/OuRUWe7qCDt3+ie os5SpvieuXH/9RZAOFLUtt7GLCxks+r0yg90045Jm7Y45N+lN/u/r9x9xD+sr1kP6t6s YTzQ== X-Gm-Message-State: AOAM53350LADyiu0fU/Y+R7EDUHJcK7AoYYhNyEH/jnXGnD55rKMz9Vf RRWTTydJmeAXuqksqjD7uIA= X-Google-Smtp-Source: ABdhPJyVItWNdyqIkztuF2J1bFHUbT2ldyUG43XSfDp+UmUmIRaw/EKX3AvdTTwSzR2ivWWMhNQkVg== X-Received: by 2002:a50:8a90:: with SMTP id j16mr4769308edj.334.1610105695313; Fri, 08 Jan 2021 03:34:55 -0800 (PST) Original-Received: from [192.168.8.4] (netacc-gpn-4-6-163.pool.telenor.hu. [84.224.6.163]) by smtp.gmail.com with ESMTPSA id by30sm3689202edb.15.2021.01.08.03.34.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 08 Jan 2021 03:34:54 -0800 (PST) Content-Language: sv-FI Received-SPF: pass client-ip=2a00:1450:4864:20::52d; envelope-from=geza.herman@gmail.com; helo=mail-ed1-x52d.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_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, 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:262738 Archived-At: Hi all, I noticed that emacs's performance can depend on the font. For example, Consolas has a much worse performance (scrolling is sluggish) than BitStream Mono. I profiled emacs, and the main difference is "draw_glyphs". When emacs is slow (using consolas), this function takes 50-60% of CPU time (measured by "perf record -g"). When emacs is fast (using BitStream), this function takes only ~2-3%. I played with my font's ascent and descent settings to have more line on the screen (as emacs doesn't support negative line-spacing). Originally, "draw_glyphs" takes 2-3% with my font. But if I decrease the height of the font by modifying ascent/descent, then the same thing happens: draw_glyphs takes 50-60% CPU time. If I set line-spacing to 2, draw_glyphs become normal, 2-3% CPU time. (I'm using a master build from yesterday) Any ideas why this happens? Maybe this happens because lines may overlap and some caching mechanism gets disabled? Thanks, Geza