LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 03-21-2014, 09:24 AM   #1
Gullible Jones
Member
 
Registered: Apr 2011
Posts: 142

Rep: Reputation: 10
Variable width fonts and performance


Something I noticed while messing around with gtkperf...

500 text add operations with Dejavu Sans Mono font:

GtkTextView - Add text - time: 10.73

vs. 500 text add operations with Dejavu Sans variable width font:

GtkTextView - Add text - time: 35.29

...

Do variable width fonts necessarily render more slowly, or has this more to do with how GTK2 does font rendering?

(If the former, I wonder if variable width fonts are responsible for some of the sluggishness of GTK2 on computers with low spec CPUs.)
 
Old 03-21-2014, 12:17 PM   #2
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Debian
Posts: 6,142

Rep: Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314
That's an interesting result! I suspect it would apply with any graphics toolkit: the more complex the font, the more work there'll be to do. In the old days, text display could be really fast on the simplest machines because there were no vector fonts, only bit-map ones.
 
Old 03-21-2014, 10:29 PM   #3
Gullible Jones
Member
 
Registered: Apr 2011
Posts: 142

Original Poster
Rep: Reputation: 10
Yeah, it looks like maybe font kerning is slow? I don't know. The results on my laptop with Ubuntu Sans vs. Ubuntu Mono are even more insane though:

GtkTextView - Add text - time: 33.74

vs

GtkTextView - Add text - time: 5.15

Makes me think it might be worth switching to monospace fonts for most widgets on slower machines, if you can find ones that are easily readable. Those differences will add up.

Edit: what's more interesting is that appending the text slows down drastically as the amount of previous text increases. Not sure if that's a GTK2 problem, or a problem with the gtkperf program; I think it smacks a bit of data structure issues...

Last edited by Gullible Jones; 03-21-2014 at 10:32 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: 7 Of The Best Ubuntu Terminal (Fixed Width) Fonts LXer Syndicated Linux News 0 07-19-2010 10:30 PM
TTY fonts with width smaller 8? MasterOfTheWind Linux - Software 0 10-16-2007 10:55 AM
Can we specify variable field width in a scanf() format string? skie_knite007 Programming 3 05-13-2005 12:56 PM
Huge spaces in all variable width fonts Dare Linux - Software 0 10-21-2004 12:45 PM
Missing fixed width fonts in KDE Romendo Linux - Software 0 12-09-2003 11:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 01:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration