1
0
mirror of https://github.com/sharkdp/bat synced 2026-07-20 16:33:20 +00:00

Merge pull request #2868 from cyqsimon/builtin-offload-v2

Faster startup by offloading glob matcher building to a worker thread
This commit is contained in:
David Peter
2024-03-10 20:08:43 +01:00
committed by GitHub
3 changed files with 50 additions and 1 deletions
+4
View File
@@ -122,6 +122,10 @@ impl App {
};
let mut syntax_mapping = SyntaxMapping::new();
// start building glob matchers for builtin mappings immediately
// this is an appropriate approach because it's statistically likely that
// all the custom mappings need to be checked
syntax_mapping.start_offload_build_all();
if let Some(values) = self.matches.get_many::<String>("ignored-suffix") {
for suffix in values {