On 15-03-03 03:56 PM, Raimund Steger wrote: > On 02/27/15 07:57, Akira TAGOH wrote: >> [...] >> diff --git a/fc-blanks/fc-blanks.py b/fc-blanks/fc-blanks.py >> [...] >> +fp = >> urllib2.urlopen('http://unicode.org/cldr/utility/list-unicodeset.jsp?a=[%3AGC%3DZs%3A][%3ADI%3A]&abb=on&ucd=on&esc=on&g') >> > > 4191 codepoints? > > Before it was more like 60... Most of the new ones are blocks of unassigned codepoints. > 'fc-cache -f' now spends 100x more time in FcBlanksIsMember, which makes for > several seconds difference on some of my boxes. In the profiler: Yeah, because currently it's stored as a list of codepoints, which is very inefficient. Worse, FcBlanksIsMember does a linear search... I'm personally in support of killing configurable blanks completely. This is very close to that. Let me improve the storage and implement bsearch... > ---8<--------------------------------------------- > > sun3:fontconfig)collect fc-cache -f > Creating experiment database test.2.er ... > sun3:fontconfig)er_print -calltree test.2.er > Functions Call Tree. Metric: Attributed User CPU Time > > Attr. Name > User CPU > sec. > 19.604 +-<Total> > [...] > 0.030 | | | | | | | | | | +-FcBlanksIsMember > [...] > 0.040 | | | | | | | | | +-FcBlanksIsMember > > ---8<--------------------------------------------- > > as opposed to: > > ---8<--------------------------------------------- > > sun3:fontconfig)collect fc-cache -f > Creating experiment database test.1.er ... > sun3:fontconfig)er_print -calltree test.1.er > Functions Call Tree. Metric: Attributed User CPU Time > > Attr. Name > User CPU > sec. > 26.939 +-<Total> > [...] > 3.683 | | | | | | | | | | | +-FcBlanksIsMember > [...] > 4.073 | | | | | | | | | +-FcBlanksIsMember > > ---8<--------------------------------------------- > > > > > -- behdad http://behdad.org/ _______________________________________________ Fontconfig mailing list Fontconfig@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/fontconfig