Closed simoncozens closed 1 year ago
Not sure if this is a useful, but I was thinking that for a lot of the tests we want we are looking at the same input string. For example running an orthographies check and then repeating it with smcp enabled. It makes me wonder if there is a run time benefit to not reloading the input string between those tests.
Right, or caching the results. Or shaping all the characters at once with Harfbuzz, and then sorting out the results. There are lots of things we can do.
One reason you're finding shaperglot slow is that you're running a new Python process (loading all the libraries, reading the font, etc.) for each script. I'll send you a PR which uses shaperglot as a library; that should speed things up significantly.
Need a speedup of about 60x.