-
-
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
bat freezes with extreme long lines (compact JSON) #1658
Comments
Thank you for reporting this. I would guess that it doesn't really freeze. It just takes a really long time. Could you please confirm that? Maybe run it with paging disabled ( |
Hello Yes, technically with Cheers, |
Thank you. Is it a file that you can share? (by attaching it to this issue?)
|
You could try building bat with the Line 26 in 71f04dc
|
The file I used is this one, it is attached in the first part of the issue: https://github.com/sharkdp/bat/files/6510052/data.tar.gz I did build it with this command: cargo build --release --features application,regex-fancy How do I run it with the |
I opened the file again: time target/release/bat --paging=never /tmp/data.json
...
real 40m22.297s
user 13m3.482s
sys 26m52.858s so the current configuration is worse than what I get when installing with |
Thank you. I added this ticket to the list of tasks in #1751. |
Note that Sublime Text will simply not highlight lines which are longer than 16k characters, maybe we can do the same in |
Closed by #2165 |
Hi all
I noticed that opening long json files makes bat get stuck.
For example the unpacked version of this file:
data.tar.gz
What did you expect to happen instead?
Maybe a warning or no highlighting.
How did you install
bat
?bat version and environment
Software version
bat 0.18.1 ()
Operating system
Linux 5.12.2-arch1-1
Command-line
Environment variables
Config file
Could not read contents of '/home/vp/.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: