Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 593340 - media-libs/freetype-2.7 font rendering performance is terrible
Summary: media-libs/freetype-2.7 font rendering performance is terrible
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Lars Wendler (Polynomial-C)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-10 03:13 UTC by Mike Gilbert
Modified: 2019-04-20 19:19 UTC (History)
8 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Gilbert gentoo-dev 2016-09-10 03:13:06 UTC
I'm seeing abnormally high high-CPU usage and terribly slow text scrolling response in konsole with freetype-2.7.

I'm not sure what kind of detail I can provide.
Comment 1 Mike Gilbert gentoo-dev 2016-09-10 15:48:00 UTC
emerge --info, in case this is not reproducible everywhere.


Portage 2.3.0_p24 (python 3.5.2-final-0, default/linux/amd64/13.0/desktop/plasma/systemd, gcc-5.4.0, glibc-2.23-r2, 4.7.2 x86_64)
=================================================================
System uname: Linux-4.7.2-x86_64-AMD_Phenom-tm-_II_X6_1055T_Processor-with-gentoo-2.3
KiB Mem:    32947976 total,   5750040 free
KiB Swap:          0 total,         0 free
sh bash 4.3_p46
ld GNU ld (Gentoo 2.26.1 p1.0) 2.26.1
app-shells/bash:          4.3_p46::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.24.0-r1::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo, 3.5.2::gentoo
dev-util/cmake:           3.6.2::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/sandbox:         2.10-r2::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r2::gentoo
sys-devel/automake:       1.11.6-r2::gentoo, 1.13.4-r1::gentoo, 1.14.1-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.26.1::gentoo
sys-devel/gcc:            4.7.4::gentoo, 4.8.5::gentoo, 4.9.3::gentoo, 5.3.0::gentoo, 5.4.0::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r2::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.7::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r2::gentoo
Repositories:

gentoo
    location: /home/floppym/repos/gentoo
    sync-type: git
    sync-uri: ssh://git@git.gentoo.org/repo/gentoo.git
    priority: -1000

crossdev
    location: /home/floppym/repos/crossdev
    masters: gentoo
    priority: 10

floppym
    location: /home/floppym/repos/floppym
    masters: gentoo
    priority: 30

local
    location: /home/floppym/repos/local
    masters: gentoo
    priority: 40

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native -frecord-gcc-switches"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/bin/startx /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.3/conf"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/ssl/certs /etc/terminfo /usr/share/themes"
CXXFLAGS="-O2 -pipe -march=native -frecord-gcc-switches"
DISTDIR="/var/portage/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask=n --binpkg-respect-use=y --binpkg-changed-deps=y --dynamic-deps=n --quiet-build=n --quiet-fail=y --with-bdeps=y --jobs=6"
FCFLAGS="-O2 -pipe -march=native -frecord-gcc-switches"
FEATURES="assume-digests binpkg-logs buildpkg cgroup clean-logs config-protect-if-modified distlocks ebuild-locks fakeroot fixlafiles ipc-sandbox network-sandbox news parallel-fetch parallel-install preserve-libs protect-owned sandbox sfperms sign strict unknown-features-warn unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe -march=native -frecord-gcc-switches"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j6"
PKGDIR="/var/portage/packages"
PORTAGE_COMPRESS="xz"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--ipv4"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/tmp"
USE="3dnow 3dnowext X a52 aac acl acpi alsa amd64 berkdb branding bzip2 cairo caps cdda cdr cli cracklib crypt css cups cxx dbus declarative dri dts dvd dvdr emboss encode exif fam ffmpeg filecaps firefox flac fontconfig fortran gdbm gif glamor gpm gtk iconv idn imap ipv6 jpeg kde kipi lcms libnotify lzma mad mmx mmxext mng modules mp3 mp4 mpeg mtp multilib ncurses nls nptl offensive ogg opengl openmp pam pango pcre pdf phonon plasma png policykit ppds pulseaudio qml qt3support qt4 qt5 readline sdl seccomp semantic-desktop session spell sse sse2 sse3 sse4a ssl startup-notification suid svg systemd taglib theora threads tiff truetype udev udisks unicode upower usb vaapi vdpau vim-syntax vorbis widgets wxwidgets x264 xattr xcb xcomposite xft xinerama xml xv xvid zlib zsh-completion" ABI_X86="64 32" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias proxy proxy_fcgi" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 3dnow 3dnowext popcnt sse3 sse4a" DRACUT_MODULES="btrfs systemd" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64 emu pc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" L10N="en en-US" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_US" OFFICE_IMPLEMENTATION="libreoffice" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4 python3_5" QEMU_SOFTMMU_TARGETS="aarch64 arm i386 x86_64" QEMU_USER_TARGETS="aarch64 arm i386 x86_64" RUBY_TARGETS="ruby23" USERLAND="GNU" VIDEO_CARDS="nouveau" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
USE_PYTHON="2.7 3.3"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS_FLAGS
Comment 2 Tom Gillespie 2016-09-12 08:05:20 UTC
Perhaps related: by default freetype-2.7 seems to use the v40 interpreter instead of the older v35 interpreter (https://www.freetype.org/freetype2/docs/reference/ft2-tt_driver.html#TT_INTERPRETER_VERSION_35). This enables hinting by default and might be what is degrading performance? If there was a way to switch between interpreters you could test if this was the issue.
Comment 3 Sietze Post 2016-09-12 21:47:10 UTC
This is happening for me too. However, if I select another font than Bitstream Vera Sans Mono the CPU usage goes right down. Do you happen to use this font as well?
Comment 4 Mike Gilbert gentoo-dev 2016-09-12 21:54:21 UTC
(In reply to priveinformatie from comment #3)

Deja Vu Sans Mono here.
Comment 5 Michael Hofmann 2016-09-12 22:33:32 UTC
> If there was a way to switch between interpreters you could 
> test if this was the issue.

There is a way! Use the new environment variable FREETYPE_PROPERTIES.

See http://lists.nongnu.org/archive/html/freetype-devel/2016-09/msg00010.html

There is an example for FREETYPE_PROPERTIES in the middle of the page.

Please report performance regressions to the developers at
https://www.freetype.org/contact.html
Comment 6 Grzegorz Kubiak 2016-09-13 03:05:14 UTC
I am experiencing the same performance issue with freetype-2.6.5 compiled with flag cleartype_hinting enabled.
Comment 7 Mike Gilbert gentoo-dev 2016-09-20 16:14:33 UTC
My performance problem definitely seems to correlate with the cleartype_hinting option. The problem is more obvious with certain fonts than others.

I'm not sure what other factors might affect this; would hardware acceleration have any effect? I'm using nouveau with a fairly old card.

I'll see about reporting it upstream.
Comment 8 tt_1 2017-03-11 20:47:48 UTC
The upgrade to 2.7 due to #612192 broke the default font in my gnome-terminal. It is really odd to read now, the space between words is now sort of randoom in size. 

Has anyone else this problem, is it related to the new cleartype_hinting useflag?
Comment 9 Pacho Ramos gentoo-dev 2017-06-20 12:19:14 UTC
Maybe 2.8 works better...
Comment 10 Captain Crutches 2017-07-29 02:53:00 UTC
I'm using 2.8 and not seeing any problems.
Comment 11 Lars Wendler (Polynomial-C) gentoo-dev 2019-04-20 19:19:35 UTC
Marking as obsolete. If this is still an issue with recent freetype releases, please file a new bug.