
Hi, all. I'm experimenting with profiling Inkscape in Valgrind looking for potential slow spots in the code, and had a question for those with more knowledge of the font loading code. One of the first places in the initialization code where I think there could be a speedup is in Inkscape::FontLister::FontLister. This method calls font_factory::Styles once for each font family that is returned by font_factory::Families. In my test run of opening and closing Inkscape with 142 font families returned by font_factory::Families, running Inkscape::FontLister::FontLister took just over 20% of the total runtime.
If there were some way to cache this font information between runs of Inkscape and only update it if the fonts on the system have changed, or if there was a way to push back the loading of fonts to later in the program execution -- say the first time someone viewed the Text toolbar or something similar -- I think it might speed up startup time in Inkscape. Anyone willing to help me take a look into this to see if this will work?
Thanks,
John