-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Slowness/choppy with specific Python syntax #1688
Comments
Thanks a lot for the bug report! I can confirm that it is slow. I also tried with the optional foo={
#'a': '1',
#'a': '2',
#'a': '3',
#'a': '4',
#'a': '5',
... this (just removing the first foo={
'a': '1',
#'a': '2',
#'a': '3',
#'a': '4',
#'a': '5',
... |
Yep, noticed myself too that various tiny changes to the input change the problem extent or remove it altogether. |
I instrumented syntect with some debug printing of regex pattern timing, and found:
this corresponds with https://github.com/sublimehq/Packages/blob/09cb8000b383c2f32de6473f44fce7d43cb8772f/Python/Python.sublime-syntax#L57-L65, specifically https://github.com/sublimehq/Packages/blob/09cb8000b383c2f32de6473f44fce7d43cb8772f/Python/Python.sublime-syntax#L1013-L1025 I wouldn't be surprised to see this replaced with ST's new branch point functionality - which syntect doesn't support yet. |
Describe the bug you encountered:
bat consumes 100% of one cpu and gives choppy output (~3 lines per second on my box) for a specific Python sample. Shell reproducer:
This is sensitive to amount of whitespace within the echo. Adding or removing some might speed it up some, but is still choppy with some other amounts.
What did you expect to happen instead?
Normal smooth output.
How did you install
bat
?git master
bat version and environment
Software version
bat 0.18.1 (35f3127-modified)
Operating system
Linux 5.8.0-55-generic
Command-line
Environment variables
Config file
Could not read contents of '/home/scop/.config/bat/config': No such file or directory (os error 2).
Compile time information
Less version
The text was updated successfully, but these errors were encountered: