Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from lervag:master #167

Open
wants to merge 1,193 commits into
base: master
Choose a base branch
from
Open

[pull] master from lervag:master #167

wants to merge 1,193 commits into from

Conversation

pull[bot]
Copy link

@pull pull bot commented Apr 28, 2021

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

lervag and others added 30 commits September 23, 2024 23:07
Zathura can safely pass the column.
More robust parser.

refer: #3005
merged rules include: texMathCmdStyle, texMathDelim, texCmdStyle,
texCmdPackage, texCmdRef, some rules for amsTeX, texSpecialChar,
texCmdRef, texCmdPart

this results in a ~20% speedup
…Env` rule

(also only one `texMathError` rule for un-matched `\end`s)

This results in a ~9% speedup.

Unfortunately I had to restrict funcionality a bit, it is no longer
possible to specify predicates when using `new_env` with `{'math':
v:true}`
`:syntime report` shows that the "skip" rules for `texMathZoneTI` and
`texMathGroup` are very expensive. The change might speed things up a bit
because every non-backslash character only needs to be looked at once.
According to `:syntime report` this reduces the time spent on the
`texMathZoneTI` skip rule from 3.1% to 2.7%, and similar for texMathGroup.
Also change other skip rules of the form `\\<char 1>\|\\<char 2>`.

Overall, this leads to a ~1% speedup.
Re-order means change the order in which they are checked. Most
importantly, (using the `_texMathBackslash` rule) we try to make the
syntax engine check syntax rules for commands first when we find a
backslash (instead of looking for things like `[(){}+-=]` etc.)

This leads to a ~5% speedup.

This is definitely suboptimal, because it's one more syntax rule, when
we could in theory just move the definitions of
```
texComment,
texSpecialChar,
texMathSymbol,
texCmdGreek,
texTabularChar,
texCmdEnvM,
texCmdFootnote,
texCmdMinipage,
texCmdParbox,
texCmdRef,
texCmdSize,
texCmdStyle,
texCmdTodo,
texCmdVerb,
texMathCmd,
texMathCmdEnv,
texMathCmdStyle,
texMathCmdStyleBold,
texMathCmdStyleItal,
texMathCmdText,
texMathDelimMod,
texMathSymbol,
```
to the bottom of `vimtex#syntax#core#init_rules()` to get the same effect.

Author: Carlos Esparza <ca2010es@gmail.com>
this leads to a massive speedup for most regexes that aren't just
literal strings (and some slowdown for matching strings, so we don't
force engine 1 for those regexes).

Overall, this leads to a ~23% speedup.

Author:    Carlos Esparza <ca2010es@gmail.com>
This results in a ~3% speedup.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.