Investigate performance degredation in some languages
The performance of some languages has dropped significantly in the past cycle, and there could be a couple of reasons for that. Opening JS files has noticeable lag in some editors.
- JavaScript and similar languages went through considerable improvements for correctness, but also brought many more sub-contexts to process.
- More languages support unicode and therefore hit slower paths in GRegex and associated tooling.
We still have some opportunities though
- First, we very much need to profile, but I suspect that is mostly going to just point a big fat finger at the opaque regex engine. That can be difficult given the iterative nature of incremental updating.
- We cannot JIT the regex using GRegex because of the internal libpcre used by GLib. We can look to dropping GRegex in favor of PCRE2.
- We can possibly keep multiple copies of the regexes and choose one based on the presence of unicode symbols.
- If our use cases are fully supported by RE2, that might be another (faster) option