summaryrefslogtreecommitdiff
path: root/pango/pangofc-coverageorder.c
Commit message (Collapse)AuthorAgeFilesLines
* Save coverage to a filewip-bitmatrixMatthias Clasen2021-02-221-3/+187
| | | | | | | | | | | Save coverage order in $XDG_CONFIG_HOME/pango/coverage.order. We compare the hashes of all fonts to identify when the coverage order needs to be recomputed. Rough numbers show that loading the coverage from a file takes < 10ms, while computing it from scratch takes >400ms. So this is clearly a win.
* Compute the coverage order ahead of timeMatthias Clasen2021-02-221-0/+239
Store a full matrix for the partial order of coverage subsets. To avoid this growing too large, use an indirection to store the information only once for identical charsets. On my system, with 4000 fonts, I see ~300 different charsets. Computing the full matrix takes a while - ~240ms. But we only have to do this once, we do it in a thread, and we can possibly store it and load it from disk. Unlike our other thread use, we won't block for the coverage, ever. Until it is available, things are simply slower. With the coverage order data, we can avoid most of the expensive charset subset calculations when trimming fontsets. This finally gets a font chooser up on the screen in less a second, on my system (~800ms).