mirror of
https://github.com/sharkdp/bat.git
synced 2026-10-30 10:06:12 +00:00
Reduce startup time in loop-through mode with 80%-90%
Instead of 100 ms - 50 ms, startup takes 10 ms - 5 ms. HighlightingAssets::get_syntax_set() is never called when e.g. piping the bat output to a file (see Config::loop_through), so by loading the SyntaxSet only when needed, we radically improve startup time when it is not needed.
This commit is contained in:
1 parent
1bac3750df
commit
6acec2c074
4 files changed
+71
-9
No files matched your search
Generated
+1
@@ -101,6 +101,7 @@ dependencies = [
|
||||
"globset",
|
||||
"grep-cli",
|
||||
"lazy_static",
|
||||
"lazycell",
|
||||
"nix",
|
||||
"path_abs",
|
||||
"predicates",
|
||||
|
||||
Reference in new issue
Block a user