Ronny V. Vindenes wrote:> While testing 2.3.91 I noticed a huge performance regression compared to > 2.3.2 (Fedora rawhide). > > If I keep my fonts[1] in several subdirectories[2], rendering pages in > epiphany[3] takes a very long time (2-3 seconds with 100% cpu load) even > for short pages using a single font (clicking through to other pages > using the same font takes as long as well), but if I put all the fonts > in a single directory things are rendered at the expected speed.In the current configuration, every directory has an in-memory bank and an associated bank id (randomly generated). fontconfig currently uses linear search to locate bank ids in a table, and I bet that''s what''s causing your problem. I implemented a naive bank lookup algorithm first and was waiting to see if anyone would complain about it being slow. Obviously it is, so I''ll commit a patch which makes the list a move-to-front list, which ought to be a sufficiently sophisticated data structure for this purpose. This ought to solve your performance problems. I''ll let you know when I''ve implemented it. pat
Ronny V. Vindenes wrote:> While testing 2.3.91 I noticed a huge performance regression compared to > 2.3.2 (Fedora rawhide).I''ve committed something which should fix your problem. Let me know if it works. pat
Ronny V. Vindenes
2005-Nov-21 08:51 UTC
[Fontconfig] 2.3.91 performance regression from 2.3.2
While testing 2.3.91 I noticed a huge performance regression compared to
2.3.2 (Fedora rawhide).
If I keep my fonts[1] in several subdirectories[2], rendering pages in
epiphany[3] takes a very long time (2-3 seconds with 100% cpu load) even
for short pages using a single font (clicking through to other pages
using the same font takes as long as well), but if I put all the fonts
in a single directory things are rendered at the expected speed.
[1] $ find ~/.fonts -type f|wc -l
3759
[2] $ find ~/.fonts -type d|wc -l
595
[3] Same goes for firefox and konqueror - I haven''t tested any other
apps.
--
Ronny V. Vindenes <ronnyvv@broadpark.no>