Open stone-zeng opened 5 years ago
Thanks for the detailed analysis. You’re completely right — really the entire “version” feature needs careful re-consideration. The way it interacts with “range” is not handled properly, and this is another example of what goes wrong.
I’ll need to do some testing but I suspect clearing the tl here will be no worse than the current behaviour. I suspect a proper fix would be to have version-specific versions of these token list variables...
Description
If setting more than one fonts, then the time for loading a single font becomes longer and longer.
Add info or delete as appropriate:
Further details
On my computer, a typical result is as the following:
You may find that the time used and operations are all increasing.
After some investigation, I find the problem is in
\@@_mathmap_noparse:nnn
, whereNotice that if
#1
isliteral
here,\g__um_switchto_#1_tl
will not be cleared. As we loading more fonts, this tl becomes extremely large, so makes the expansion and assignment slower and slower. For other situations e.g.#1=up
, there is no such problem.