mirror of
https://github.com/nushell/nushell
synced 2024-12-25 12:33:17 +00:00
Remove bin.is_file() because it's expensive (#1689)
This one change takes the startup time from 2.8 seconds to 1.2 seconds in my testing on Windows.
This commit is contained in:
parent
7d403a6cc7
commit
e9e3fac59d
1 changed files with 0 additions and 4 deletions
|
@ -136,10 +136,6 @@ pub fn load_plugins(context: &mut Context) -> Result<(), ShellError> {
|
|||
Err(_) => {}
|
||||
Ok(binaries) => {
|
||||
for bin in binaries.filter_map(Result::ok) {
|
||||
if !bin.is_file() {
|
||||
continue;
|
||||
}
|
||||
|
||||
let bin_name = {
|
||||
if let Some(name) = bin.file_name() {
|
||||
match name.to_str() {
|
||||
|
|
Loading…
Reference in a new issue