forked from lervag/vimtex
-
Notifications
You must be signed in to change notification settings - Fork 0
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
pull
wants to merge
1,193
commits into
Mu-L:master
Choose a base branch
from
lervag:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
refer: #2705
Combine these into syntax#core#new_env and add option 'nested' to specify nested syntax regions. This allows some simplification and general improvements.
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 ~1.5% speedup.
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by pull[bot]
Can you help keep this open source service alive? 💖 Please sponsor : )