https://bugs.kde.org/show_bug.cgi?id=378227
Bug ID: 378227
Summary: KDialog scans all fonts directory before showing
dialog box making it super slow
Product: kdialog
Version: 1.0
Platform: Other
OS: Linux
Status: UNCONFIRMED
Severity: normal
Priority: NOR
Component: general
Assignee: br...@frogmouth.net
Reporter: dpac.mitt...@gmail.com
Target Milestone: ---
I used strace and found out kdialog scans all my fonts directory before
launching. If there are tons of fonts, it sometimes takes upto 10-15 seconds to
show up. This is on a SSD, I can only imagine how slow it would be on an HDD.
I noticed these files take up tons of stat calls:
stat("/usr/share/fonts/opentype/scp/Roman/ExtraLight/font.ufo/glyphs/mdotbelow.glif",
{st_mode=S_IFREG|0644, st_size=224, ...}) = 0
stat("/usr/share/fonts/opentype/scp/Roman/ExtraLight/font.ufo/glyphs/mediumshade.glif",
{st_mode=S_IFREG|0644, st_size=19674, ...}) = 0
stat("/usr/share/fonts/opentype/scp/Roman/ExtraLight/font.ufo/glyphs/mhook.glif",
{st_mode=S_IFREG|0644, st_size=2098, ...}) = 0
stat("/usr/share/fonts/opentype/scp/Roman/ExtraLight/font.ufo/glyphs/minus.glif",
{st_mode=S_IFREG|0644, st_size=332, ...}) = 0
stat("/usr/share/fonts/opentype/scp/Roman/ExtraLight/font.ufo/glyphs/minusbelowcmb.glif",
{st_mode=S_IFREG|0644, st_size=427, ...}) = 0
stat("/usr/share/fonts/opentype/scp/Roman/ExtraLight/font.ufo/glyphs/mlonglegturned.glif",
{st_mode=S_IFREG|0644, st_size=1709, ...}) = 0
stat("/usr/share/fonts/opentype/scp/Roman/ExtraLight/font.ufo/glyphs/mturned.glif",
{st_mode=S_IFREG|0644, st_size=387, ...}) = 0
stat("/usr/share/fonts/opentype/scp/Roman/ExtraLight/font.ufo/glyphs/mu.glif",
{st_mode=S_IFREG|0644, st_size=1523, ...}) = 0
stat("/usr/share/fonts/opentype/scp/Roman/ExtraLight/font.ufo/glyphs/mu.math.glif",
{st_mode=S_IFREG|0644, st_size=176, ...}) = 0
stat("/usr/share/fonts/opentype/scp/Roman/ExtraLight/font.ufo/glyphs/multiply.glif",
{st_mode=S_IFREG|0644, st_size=657, ...}) = 0
stat("/usr/share/fonts/opentype/scp/Roman/ExtraLight/font.ufo/glyphs/musicalnotedbl.glif",
{st_mode=S_IFREG|0644, st_size=1513, ...}) = 0
stat("/usr/share/fonts/opentype/scp/Roman/ExtraLight/font.ufo/glyphs/n.glif",
{st_mode=S_IFREG|0644, st_size=1199, ...}) = 0
stat("/usr/share/fonts/opentype/scp/Roman/ExtraLight/font.ufo/glyphs/n.sups.glif",
{st_mode=S_IFREG|0644, st_size=952, ...}) = 0
stat("/usr/share/fonts/opentype/scp/Roman/ExtraLight/font.ufo/glyphs/nacute.glif",
{st_mode=S_IFREG|0644, st_size=218, ...}) = 0
stat("/usr/share/fonts/opentype/scp/Roman/ExtraLight/font.ufo/glyphs/naira.glif",
{st_mode=S_IFREG|0644, st_size=1250, ...}) = 0
stat("/usr/share/fonts/opentype/scp/Roman/ExtraLight/font.ufo/glyphs/napostrophe.glif",
{st_mode=S_IFREG|0644, st_size=1020, ...}) = 0
stat("/usr/share/fonts/opentype/scp/Roman/ExtraLight/font.ufo/glyphs/nbspace.frac.glif",
{st_mode=S_IFREG|0644, st_size=110, ...}) = 0
stat("/usr/share/fonts/opentype/scp/Roman/ExtraLight/font.ufo/glyphs/nbspace.glif",
{st_mode=S_IFREG|0644, st_size=128, ...}) = 0
stat("/usr/share/fonts/opentype/scp/Roman/ExtraLight/font.ufo/glyphs/ncaron.glif",
{st_mode=S_IFREG|0644, st_size=218, ...}) = 0
stat("/usr/share/fonts/opentype/scp/Roman/ExtraLight/font.ufo/glyphs/ncommaaccent.glif",
{st_mode=S_IFREG|0644, st_size=229, ...}) = 0
stat("/usr/share/fonts/opentype/scp/Roman/ExtraLight/font.ufo/glyphs/ndotaccent.glif",
{st_mode=S_IFREG|0644, st_size=226, ...}) = 0
stat("/usr/share/fonts/opentype/scp/Roman/ExtraLight/font.ufo/glyphs/ndotbelow.glif",
{st_mode=S_IFREG|0644, st_size=224, ...}) = 0
stat("/usr/share/fonts/opentype/scp/Roman/ExtraLight/font.ufo/glyphs/ngrave.glif",
{st_mode=S_IFREG|0644, st_size=218, ...}) = 0
stat("/usr/share/fonts/opentype/scp/Roman/ExtraLight/font.ufo/glyphs/nhookleft.glif",
{st_mode=S_IFREG|0644, st_size=1551, ...}) = 0
stat("/usr/share/fonts/opentype/scp/Roman/ExtraLight/font.ufo/glyphs/nine.cap.glif",
{st_mode=S_IFREG|0644, st_size=1516, ...}) = 0
stat("/usr/share/fonts/opentype/scp/Roman/ExtraLight/font.ufo/glyphs/nine.dnom.glif",
{st_mode=S_IFREG|0644, st_size=1519, ...}) = 0
stat("/usr/share/fonts/opentype/scp/Roman/ExtraLight/font.ufo/glyphs/nine.glif",
{st_mode=S_IFREG|0644, st_size=1535, ...}) = 0
stat("/usr/share/fonts/opentype/scp/Roman/ExtraLight/font.ufo/glyphs/nine.numr.glif",
{st_mode=S_IFREG|0644, st_size=176, ...}) = 0
stat("/usr/share/fonts/opentype/scp/Roman/ExtraLight/font.ufo/glyphs/nine.onum.glif",
{st_mode=S_IFREG|0644, st_size=1521, ...}) = 0
stat("/usr/share/fonts/opentype/scp/Roman/ExtraLight/font.ufo/glyphs/nine.subs.glif",
{st_mode=S_IFREG|0644, st_size=1527, ...}) = 0
stat("/usr/share/fonts/opentype/scp/Roman/ExtraLight/font.ufo/glyphs/nine.sups.glif",
{st_mode=S_IFREG|0644, st_size=176, ...}) = 0
stat("/usr/share/fonts/opentype/scp/Roman/ExtraLight/font.ufo/glyphs/nje.glif",
{st_mode=S_IFREG|0644, st_size=1467,