Bug 177591 - inconsistent startup times for gedit.
Summary: inconsistent startup times for gedit.
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: gedit
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Ray Strode [halfline]
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: FC5Target
TreeView+ depends on / blocked
 
Reported: 2006-01-11 23:59 UTC by Dave Jones
Modified: 2015-01-04 22:24 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2006-01-26 03:15:00 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
strace output from a run that takes <1 second (606.66 KB, text/plain)
2006-01-12 00:01 UTC, Dave Jones
no flags Details
strace output from a run that takes 15 seconds (2.86 MB, text/plain)
2006-01-12 00:03 UTC, Dave Jones
no flags Details

Description Dave Jones 2006-01-11 23:59:52 UTC
Ok, this is just freaky.

(18:54:21:davej@nwo:2.6.16)$ time gedit
0.85user 0.14system 0:03.46elapsed 28%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (3major+9979minor)pagefaults 0swaps
(18:54:27:davej@nwo:2.6.16)$ time gedit
15.84user 0.79system 0:19.63elapsed 84%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (4major+117015minor)pagefaults 0swaps
(18:54:48:davej@nwo:2.6.16)$ time gedit
0.86user 0.12system 0:02.11elapsed 46%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+9982minor)pagefaults 0swaps
(18:54:52:davej@nwo:2.6.16)$ time gedit
15.88user 0.75system 0:18.42elapsed 90%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+117021minor)pagefaults 0swaps
(18:55:11:davej@nwo:2.6.16)$ time gedit
0.87user 0.14system 0:02.12elapsed 47%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+9983minor)pagefaults 0swaps
(18:55:14:davej@nwo:2.6.16)$ time gedit
15.80user 0.89system 0:18.20elapsed 91%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+117022minor)pagefaults 0swaps
(18:56:06:davej@nwo:2.6.16)$

Every other run takes 15s, and this is 100% reproducable.

I ran strace (outputs attached) and the 15s variant is open()'ing every font I
have installed.  (My ~/.fonts is huge -- like 7000 fonts huge), so things like
this tend to stand out.

Whilst the answer may be 'dont have 7000 fonts', the fact that gedit doesn't do
the same thing consistently is just bizarre.

Comment 1 Dave Jones 2006-01-12 00:01:33 UTC
Created attachment 123098 [details]
strace output from a run that takes <1 second

Comment 2 Dave Jones 2006-01-12 00:03:15 UTC
Created attachment 123099 [details]
strace output from a run that takes 15 seconds

Comment 3 Dave Jones 2006-01-12 00:15:55 UTC
strace-account (http://www.gnome.org/~mortenw/files/strace-account) on the
'slow' output is interesting..


Small-Chunk File Input/Output.
-----------------------------

This is a list of files that are accessed in small chunks.  "Badness" is a
heuristic measure of this.  The list is truncated at badness 2.00.  A file
can appear more than once if it is opened more than once.

Badness    Bytes  I/Os  File
....
   4.91  8555724    24  /home/davej/.fonts.cache-2.NEW

Looks like we're regenerating the cache every other run for some reason. 
Perhaps this isn't a gedit problem at all, but maybe fontconfig ?


Comment 4 Dave Jones 2006-01-12 00:27:11 UTC
Here's the dir it's rescanning in the longer strace.

(19:22:11:root@nwo:2.6.16)# ls -la /usr/share/fonts/default/ghostscript/
total 1980
drwxr-xr-x 2 root root  4096 Dec 15 14:59 ./
drwxr-xr-x 4 root root  4096 Dec 18 17:05 ../
-rw-r--r-- 1 root root 21626 Dec 11 04:31 bchb.afm
-rw-r--r-- 1 root root 22099 Dec 11 04:31 bchbi.afm
-rw-r--r-- 1 root root 69478 Dec 11 04:31 bchbi.pfa
-rw-r--r-- 1 root root 66591 Dec 11 04:31 bchb.pfa
-rw-r--r-- 1 root root 19764 Dec 11 04:31 bchr.afm
-rw-r--r-- 1 root root 19927 Dec 11 04:31 bchri.afm
-rw-r--r-- 1 root root 69259 Dec 11 04:31 bchri.pfa
-rw-r--r-- 1 root root 68769 Dec 11 04:31 bchr.pfa
-rw-r--r-- 1 root root  5031 Dec 11 04:31 fcyr.afm
-rw-r--r-- 1 root root 36052 Dec 11 04:31 fcyr.gsf
-rw-r--r-- 1 root root  6195 Dec 11 04:31 fcyri.afm
-rw-r--r-- 1 root root 44539 Dec 11 04:31 fcyri.gsf
-rw-r--r-- 1 root root 38927 Dec 11 04:31 fhirw.gsf
-rw-r--r-- 1 root root   664 Dec 11 04:31 fhirw.pfm
-rw-r--r-- 1 root root 40247 Dec 11 04:31 fkarw.gsf
-rw-r--r-- 1 root root   664 Dec 11 04:31 fkarw.pfm
-rw-r--r-- 1 root root  8447 Oct  6 16:57 fonts.cache-1
-rw-r--r-- 1 root root 28672 Dec 15 14:59 fonts.cache-2
-rw-r--r-- 1 root root   826 Dec 11 04:31 hrgerb.gsf
-rw-r--r-- 1 root root   830 Dec 11 04:31 hrgerd.gsf
-rw-r--r-- 1 root root   831 Dec 11 04:31 hrgero.gsf
-rw-r--r-- 1 root root 58276 Dec 11 04:31 hrger.pfa
-rw-r--r-- 1 root root  8964 Dec 11 04:31 hrgkc.gsf
-rw-r--r-- 1 root root  7036 Dec 11 04:31 hrgks.gsf
-rw-r--r-- 1 root root   824 Dec 11 04:31 hrgrrb.gsf
-rw-r--r-- 1 root root   829 Dec 11 04:31 hrgrro.gsf
-rw-r--r-- 1 root root 57602 Dec 11 04:31 hrgrr.pfa
-rw-r--r-- 1 root root   826 Dec 11 04:31 hritrb.gsf
-rw-r--r-- 1 root root   831 Dec 11 04:31 hritro.gsf
-rw-r--r-- 1 root root 51555 Dec 11 04:31 hritr.pfa
-rw-r--r-- 1 root root   822 Dec 11 04:31 hrpldb.gsf
-rw-r--r-- 1 root root   836 Dec 11 04:31 hrpldbi.gsf
-rw-r--r-- 1 root root 42729 Dec 11 04:31 hrpldi.pfa
-rw-r--r-- 1 root root 41490 Dec 11 04:31 hrpld.pfa
-rw-r--r-- 1 root root   152 Dec 11 04:31 hrplrb.gsf
-rw-r--r-- 1 root root   162 Dec 11 04:31 hrplrbo.gsf
-rw-r--r-- 1 root root  9039 Dec 11 04:31 hrplr.gsf
-rw-r--r-- 1 root root   157 Dec 11 04:31 hrplro.gsf
-rw-r--r-- 1 root root   168 Dec 11 04:31 hrplsb.gsf
-rw-r--r-- 1 root root   178 Dec 11 04:31 hrplsbo.gsf
-rw-r--r-- 1 root root  6750 Dec 11 04:31 hrpls.gsf
-rw-r--r-- 1 root root   173 Dec 11 04:31 hrplso.gsf
-rw-r--r-- 1 root root   824 Dec 11 04:31 hrpltb.gsf
-rw-r--r-- 1 root root   838 Dec 11 04:31 hrpltbi.gsf
-rw-r--r-- 1 root root 59013 Dec 11 04:31 hrplti.pfa
-rw-r--r-- 1 root root 60102 Dec 11 04:31 hrplt.pfa
-rw-r--r-- 1 root root   826 Dec 11 04:31 hrsccb.gsf
-rw-r--r-- 1 root root   831 Dec 11 04:31 hrscco.gsf
-rw-r--r-- 1 root root 44900 Dec 11 04:31 hrscc.pfa
-rw-r--r-- 1 root root   826 Dec 11 04:31 hrscsb.gsf
-rw-r--r-- 1 root root   831 Dec 11 04:31 hrscso.gsf
-rw-r--r-- 1 root root 39219 Dec 11 04:31 hrscs.pfa
-rw-r--r-- 1 root root 13675 Dec 11 04:31 hrsyr.gsf
-rw-r--r-- 1 root root 75363 Dec 11 04:31 putbi.pfa
-rw-r--r-- 1 root root 72834 Dec 11 04:31 putb.pfa
-rw-r--r-- 1 root root 74892 Dec 11 04:31 putri.pfa
-rw-r--r-- 1 root root 72354 Dec 11 04:31 putr.pfa
-rw-r--r-- 1 root root 18854 Dec 11 04:31 u003043t.afm
-rw-r--r-- 1 root root 68180 Dec 11 04:31 u003043t.gsf
-rw-r--r-- 1 root root  2591 Dec 11 04:31 u003043t.pfm
-rw-r--r-- 1 root root 18707 Dec 11 04:31 u004006t.afm
-rw-r--r-- 1 root root 52007 Dec 11 04:31 u004006t.gsf
-rw-r--r-- 1 root root  2561 Dec 11 04:31 u004006t.pfm



Comment 5 Paolo Maggi 2006-01-12 11:05:25 UTC
I don't think this is due to gedit. Have you tried to reproduce this problem
with other gtk+ programs? 
Please, try to reproduce the problem using the texttest program in gtk+/tests
(if you have it).

Comment 6 Trevor Davenport 2006-01-12 19:42:08 UTC
I have had a similar problem just recently in rawhide with programs.  I
specifically noticed it with an app I am writing and noticed it happens with
gedit as well.  My gnome-terminal sometimes takes a very large amount of time to
open sometimes as well.  After stracing I tried removing most of the fonts I had
installed and it the issue has been greatly reduced.  XFS also recently started
recreating the cache at every start...perhaps something related it the cache has
changed that is causing this.

Comment 7 sangu 2006-01-13 16:57:14 UTC
Please see bug 176409

See Also : 
Pango crash [pango_fc_font_real_get_glyph]:
http://bugzilla.gnome.org/show_bug.cgi?id=324831
Pango crash while shaping Japanese glyphs [basic_engine_shape]:
http://bugzilla.gnome.org/show_bug.cgi?id=324835




Comment 8 Bill Crawford 2006-01-15 04:55:24 UTC
This happens with a noticeable difference in startup time for firefox with less
than a thousand fonts (basically all the standard X type1/tt fonts, plus a
collection from xp). Startup time alternates between just under five seconds,
and over ten.

Comment 9 sangu 2006-01-25 13:05:26 UTC
Please see also bug 178757 .

Comment 10 Matthias Clasen 2006-01-25 13:32:04 UTC
Dave, do you still see this with yesterdays fontconfig ?

Comment 11 Dave Jones 2006-01-26 03:15:00 UTC
I did until I removed .fonts/fonts.cache-* and ~/.fonts.cache* and reran fc-cache -f

Now, after the first run, gedit consistently starts up in less than a second.
Nice job!


Note You need to log in before you can comment on or make changes to this bug.