Adopt `vscode-oniguruma` by alexdima · Pull Request #95958 · microsoft/vscode
@slimsag Yes, the measurements are in millis. I got them by running F1 > Developer: Force Retokenize which flushes any cached tokens and synchronously (without yielding) tokenizes the entire file top-bottom. It then prints the time taken to the developer tools... [Normally tokenization runs for some time, then yields to allow the event loop to process events, then tokenizes again, etc].
https://github.com/trishume/syntect looks like a great project. I'm not sure how times can be compared objectively. The current JS TM grammar that VS Code ships with is not written with speed in mind (it is basically the entire TS TM grammar with some minor things removed). Philosophically, it is also written more like a parser, which leads sometimes to some extraordinarily complex regular expressions -- e.g.). Matching such regular expressions is no breeze for any regex engine:
Regarding bootstrap.min.css, I honestly didn't have a lot of time to dig deep into it, since I was so happy with the wins for the regular files. Minified code is something very specific to the web ecosystem (CSS/JS/HTML), and VS Code often cheats by ignoring such long lines. There is a setting to forcefully enable parsing of those, but that is used rarely in practice, since most folks end up opening a minified file due to a breakpoint or to check something out, and rarely have the intention of really editing the minified code.
