mirror of
https://github.com/nushell/nushell
synced 2024-12-26 13:03:07 +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(_) => {}
|
Err(_) => {}
|
||||||
Ok(binaries) => {
|
Ok(binaries) => {
|
||||||
for bin in binaries.filter_map(Result::ok) {
|
for bin in binaries.filter_map(Result::ok) {
|
||||||
if !bin.is_file() {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
let bin_name = {
|
let bin_name = {
|
||||||
if let Some(name) = bin.file_name() {
|
if let Some(name) = bin.file_name() {
|
||||||
match name.to_str() {
|
match name.to_str() {
|
||||||
|
|
Loading…
Reference in a new issue