mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
perf: switch to a higher-performance hash algorithm (#3083)
This commit is contained in:
parent
ae75fc0f7b
commit
7a9bfff95d
45 changed files with 78 additions and 56 deletions
8
Cargo.lock
generated
8
Cargo.lock
generated
|
|
@ -3464,7 +3464,6 @@ version = "25.6.11"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"crossterm 0.29.0",
|
"crossterm 0.29.0",
|
||||||
"foldhash",
|
|
||||||
"futures",
|
"futures",
|
||||||
"hashbrown",
|
"hashbrown",
|
||||||
"libc",
|
"libc",
|
||||||
|
|
@ -3516,7 +3515,7 @@ name = "yazi-binding"
|
||||||
version = "25.6.11"
|
version = "25.6.11"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ansi-to-tui",
|
"ansi-to-tui",
|
||||||
"foldhash",
|
"hashbrown",
|
||||||
"mlua",
|
"mlua",
|
||||||
"paste",
|
"paste",
|
||||||
"ratatui",
|
"ratatui",
|
||||||
|
|
@ -3540,6 +3539,7 @@ dependencies = [
|
||||||
"clap_complete_fig",
|
"clap_complete_fig",
|
||||||
"clap_complete_nushell",
|
"clap_complete_nushell",
|
||||||
"futures",
|
"futures",
|
||||||
|
"hashbrown",
|
||||||
"regex",
|
"regex",
|
||||||
"serde",
|
"serde",
|
||||||
"vergen-gitcl",
|
"vergen-gitcl",
|
||||||
|
|
@ -3597,6 +3597,7 @@ dependencies = [
|
||||||
"crossterm 0.29.0",
|
"crossterm 0.29.0",
|
||||||
"dirs",
|
"dirs",
|
||||||
"globset",
|
"globset",
|
||||||
|
"hashbrown",
|
||||||
"indexmap",
|
"indexmap",
|
||||||
"ratatui",
|
"ratatui",
|
||||||
"regex",
|
"regex",
|
||||||
|
|
@ -3728,6 +3729,7 @@ dependencies = [
|
||||||
"dirs",
|
"dirs",
|
||||||
"foldhash",
|
"foldhash",
|
||||||
"futures",
|
"futures",
|
||||||
|
"hashbrown",
|
||||||
"libc",
|
"libc",
|
||||||
"objc",
|
"objc",
|
||||||
"parking_lot",
|
"parking_lot",
|
||||||
|
|
@ -3777,6 +3779,7 @@ dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"crossterm 0.29.0",
|
"crossterm 0.29.0",
|
||||||
"futures",
|
"futures",
|
||||||
|
"hashbrown",
|
||||||
"libc",
|
"libc",
|
||||||
"mlua",
|
"mlua",
|
||||||
"parking_lot",
|
"parking_lot",
|
||||||
|
|
@ -3831,6 +3834,7 @@ dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-priority-channel",
|
"async-priority-channel",
|
||||||
"futures",
|
"futures",
|
||||||
|
"hashbrown",
|
||||||
"libc",
|
"libc",
|
||||||
"lru 0.16.0",
|
"lru 0.16.0",
|
||||||
"parking_lot",
|
"parking_lot",
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,6 @@ yazi-widgets = { path = "../yazi-widgets", version = "25.6.11" }
|
||||||
# External dependencies
|
# External dependencies
|
||||||
anyhow = { workspace = true }
|
anyhow = { workspace = true }
|
||||||
crossterm = { workspace = true }
|
crossterm = { workspace = true }
|
||||||
foldhash = { workspace = true }
|
|
||||||
futures = { workspace = true }
|
futures = { workspace = true }
|
||||||
hashbrown = { workspace = true }
|
hashbrown = { workspace = true }
|
||||||
mlua = { workspace = true }
|
mlua = { workspace = true }
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ impl File {
|
||||||
folder: &yazi_core::tab::Folder,
|
folder: &yazi_core::tab::Folder,
|
||||||
tab: &yazi_core::tab::Tab,
|
tab: &yazi_core::tab::Tab,
|
||||||
) -> mlua::Result<AnyUserData> {
|
) -> mlua::Result<AnyUserData> {
|
||||||
use std::collections::hash_map::Entry;
|
use hashbrown::hash_map::Entry;
|
||||||
|
|
||||||
Ok(match super::FILE_CACHE.borrow_mut().entry(PtrCell(&folder.files[idx])) {
|
Ok(match super::FILE_CACHE.borrow_mut().entry(PtrCell(&folder.files[idx])) {
|
||||||
Entry::Occupied(oe) => oe.into_mut().clone(),
|
Entry::Occupied(oe) => oe.into_mut().clone(),
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
|
|
||||||
use foldhash::HashMap;
|
use hashbrown::HashMap;
|
||||||
use mlua::{AnyUserData, UserData};
|
use mlua::{AnyUserData, UserData};
|
||||||
use scopeguard::defer;
|
use scopeguard::defer;
|
||||||
use tracing::error;
|
use tracing::error;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
use std::{borrow::Cow, collections::HashMap, ffi::{OsStr, OsString}, hash::Hash, io::{Read, Write}, ops::Deref, path::Path};
|
use std::{borrow::Cow, ffi::{OsStr, OsString}, hash::Hash, io::{Read, Write}, ops::Deref, path::Path};
|
||||||
|
|
||||||
use anyhow::{Result, anyhow};
|
use anyhow::{Result, anyhow};
|
||||||
use crossterm::{execute, style::Print};
|
use crossterm::{execute, style::Print};
|
||||||
|
use hashbrown::HashMap;
|
||||||
use scopeguard::defer;
|
use scopeguard::defer;
|
||||||
use tokio::io::AsyncWriteExt;
|
use tokio::io::AsyncWriteExt;
|
||||||
use yazi_config::{YAZI, opener::OpenerRule};
|
use yazi_config::{YAZI, opener::OpenerRule};
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ yazi-shared = { path = "../yazi-shared", version = "25.6.11" }
|
||||||
|
|
||||||
# External dependencies
|
# External dependencies
|
||||||
ansi-to-tui = { workspace = true }
|
ansi-to-tui = { workspace = true }
|
||||||
foldhash = { workspace = true }
|
hashbrown = { workspace = true }
|
||||||
mlua = { workspace = true }
|
mlua = { workspace = true }
|
||||||
paste = { workspace = true }
|
paste = { workspace = true }
|
||||||
ratatui = { workspace = true }
|
ratatui = { workspace = true }
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
use foldhash::HashMap;
|
use hashbrown::HashMap;
|
||||||
use mlua::{Lua, MetaMethod, UserData, UserDataMethods, Value};
|
use mlua::{Lua, MetaMethod, UserData, UserDataMethods, Value};
|
||||||
|
|
||||||
pub type ComposerGet = fn(&Lua, &[u8]) -> mlua::Result<Value>;
|
pub type ComposerGet = fn(&Lua, &[u8]) -> mlua::Result<Value>;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
use std::collections::{HashMap, VecDeque};
|
use std::collections::VecDeque;
|
||||||
|
|
||||||
|
use hashbrown::HashMap;
|
||||||
use mlua::Function;
|
use mlua::Function;
|
||||||
|
|
||||||
#[derive(Debug, Default)]
|
#[derive(Debug, Default)]
|
||||||
|
|
|
||||||
|
|
@ -16,10 +16,11 @@ yazi-macro = { path = "../yazi-macro", version = "25.6.11" }
|
||||||
yazi-shared = { path = "../yazi-shared", version = "25.6.11" }
|
yazi-shared = { path = "../yazi-shared", version = "25.6.11" }
|
||||||
|
|
||||||
# External dependencies
|
# External dependencies
|
||||||
clap = { workspace = true }
|
clap = { workspace = true }
|
||||||
futures = { workspace = true }
|
futures = { workspace = true }
|
||||||
regex = { workspace = true }
|
hashbrown = { workspace = true }
|
||||||
serde = { workspace = true }
|
regex = { workspace = true }
|
||||||
|
serde = { workspace = true }
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
yazi-shared = { path = "../yazi-shared", version = "25.6.11" }
|
yazi-shared = { path = "../yazi-shared", version = "25.6.11" }
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
use std::{collections::HashSet, path::PathBuf};
|
use std::path::PathBuf;
|
||||||
|
|
||||||
use futures::executor::block_on;
|
use futures::executor::block_on;
|
||||||
|
use hashbrown::HashSet;
|
||||||
use serde::Serialize;
|
use serde::Serialize;
|
||||||
use yazi_fs::{CWD, Xdg, path::expand_url, provider};
|
use yazi_fs::{CWD, Xdg, path::expand_url, provider};
|
||||||
use yazi_shared::url::{UrlBuf, UrnBuf};
|
use yazi_shared::url::{UrlBuf, UrnBuf};
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ bitflags = { workspace = true }
|
||||||
crossterm = { workspace = true }
|
crossterm = { workspace = true }
|
||||||
dirs = { workspace = true }
|
dirs = { workspace = true }
|
||||||
globset = { workspace = true }
|
globset = { workspace = true }
|
||||||
|
hashbrown = { workspace = true }
|
||||||
indexmap = { workspace = true }
|
indexmap = { workspace = true }
|
||||||
ratatui = { workspace = true }
|
ratatui = { workspace = true }
|
||||||
regex = { workspace = true }
|
regex = { workspace = true }
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
use std::{collections::HashSet, ops::Deref};
|
use std::ops::Deref;
|
||||||
|
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
|
use hashbrown::HashSet;
|
||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
use yazi_codegen::DeserializeOver2;
|
use yazi_codegen::DeserializeOver2;
|
||||||
use yazi_shared::Layer;
|
use yazi_shared::Layer;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
use std::{collections::HashMap, mem, ops::Deref};
|
use std::{mem, ops::Deref};
|
||||||
|
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
|
use hashbrown::HashMap;
|
||||||
use indexmap::IndexSet;
|
use indexmap::IndexSet;
|
||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
use std::collections::HashSet;
|
|
||||||
|
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
|
use hashbrown::HashSet;
|
||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
use tracing::warn;
|
use tracing::warn;
|
||||||
use yazi_codegen::DeserializeOver2;
|
use yazi_codegen::DeserializeOver2;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
use std::{collections::HashMap, ops::Deref};
|
use std::ops::Deref;
|
||||||
|
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
|
use hashbrown::HashMap;
|
||||||
use serde::{Deserialize, Deserializer};
|
use serde::{Deserialize, Deserializer};
|
||||||
use yazi_codegen::DeserializeOver2;
|
use yazi_codegen::DeserializeOver2;
|
||||||
use yazi_fs::File;
|
use yazi_fs::File;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
use std::collections::HashMap;
|
use hashbrown::HashMap;
|
||||||
|
|
||||||
use yazi_parser::cmp::CmpItem;
|
use yazi_parser::cmp::CmpItem;
|
||||||
use yazi_shared::{Id, url::UrlBuf};
|
use yazi_shared::{Id, url::UrlBuf};
|
||||||
use yazi_widgets::Scrollable;
|
use yazi_widgets::Scrollable;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
use std::{collections::HashMap, iter, ops::{Deref, DerefMut}};
|
use std::{iter, ops::{Deref, DerefMut}};
|
||||||
|
|
||||||
|
use hashbrown::HashMap;
|
||||||
use yazi_shared::url::{Url, UrlBuf};
|
use yazi_shared::url::{Url, UrlBuf};
|
||||||
|
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
use std::{collections::{HashMap, HashSet}, time::Duration};
|
use std::time::Duration;
|
||||||
|
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
|
use hashbrown::{HashMap, HashSet};
|
||||||
use notify::{PollWatcher, RecommendedWatcher, RecursiveMode, Watcher as _Watcher};
|
use notify::{PollWatcher, RecommendedWatcher, RecursiveMode, Watcher as _Watcher};
|
||||||
use parking_lot::RwLock;
|
use parking_lot::RwLock;
|
||||||
use tokio::{pin, sync::{mpsc::{self, UnboundedReceiver}, watch}};
|
use tokio::{pin, sync::{mpsc::{self, UnboundedReceiver}, watch}};
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
use std::collections::HashMap;
|
|
||||||
|
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
|
use hashbrown::HashMap;
|
||||||
use yazi_fs::{Files, Filter, FilterCase};
|
use yazi_fs::{Files, Filter, FilterCase};
|
||||||
use yazi_shared::url::{UrlBuf, Urn, UrnBuf};
|
use yazi_shared::url::{UrlBuf, Urn, UrnBuf};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
use std::{borrow::Cow, collections::HashMap, ffi::OsString, mem};
|
use std::{borrow::Cow, ffi::OsString, mem};
|
||||||
|
|
||||||
|
use hashbrown::HashMap;
|
||||||
use yazi_config::{YAZI, opener::OpenerRule};
|
use yazi_config::{YAZI, opener::OpenerRule};
|
||||||
use yazi_parser::tasks::ProcessExecOpt;
|
use yazi_parser::tasks::ProcessExecOpt;
|
||||||
use yazi_shared::url::UrlBuf;
|
use yazi_shared::url::UrlBuf;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
use std::{collections::{HashMap, HashSet}, iter, mem, str::FromStr};
|
use std::{iter, mem, str::FromStr};
|
||||||
|
|
||||||
use anyhow::{Context, Result, bail};
|
use anyhow::{Context, Result, bail};
|
||||||
|
use hashbrown::{HashMap, HashSet};
|
||||||
use parking_lot::RwLock;
|
use parking_lot::RwLock;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use tokio::{io::AsyncWriteExt, select, sync::mpsc, task::JoinHandle, time};
|
use tokio::{io::AsyncWriteExt, select, sync::mpsc, task::JoinHandle, time};
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
use std::{borrow::Cow, collections::HashMap};
|
use std::borrow::Cow;
|
||||||
|
|
||||||
|
use hashbrown::HashMap;
|
||||||
use mlua::{IntoLua, Lua, Value};
|
use mlua::{IntoLua, Lua, Value};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use yazi_shared::url::UrlBuf;
|
use yazi_shared::url::UrlBuf;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
use std::collections::HashMap;
|
use hashbrown::HashMap;
|
||||||
|
|
||||||
use mlua::{ExternalResult, IntoLua, Lua, Value};
|
use mlua::{ExternalResult, IntoLua, Lua, Value};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use yazi_shared::{Id, SStr};
|
use yazi_shared::{Id, SStr};
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
use std::{borrow::Cow, collections::HashSet};
|
use std::borrow::Cow;
|
||||||
|
|
||||||
|
use hashbrown::HashSet;
|
||||||
use mlua::{ExternalResult, IntoLua, Lua, Value};
|
use mlua::{ExternalResult, IntoLua, Lua, Value};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use yazi_shared::SStr;
|
use yazi_shared::SStr;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
use std::collections::HashMap;
|
|
||||||
|
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use hashbrown::HashSet;
|
use hashbrown::{HashMap, HashSet};
|
||||||
use mlua::Function;
|
use mlua::Function;
|
||||||
use parking_lot::RwLock;
|
use parking_lot::RwLock;
|
||||||
use yazi_boot::BOOT;
|
use yazi_boot::BOOT;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
use std::{any::TypeId, borrow::Cow, collections::HashMap};
|
use std::{any::TypeId, borrow::Cow};
|
||||||
|
|
||||||
|
use hashbrown::HashMap;
|
||||||
use mlua::{ExternalError, IntoLua, Lua, MultiValue, Table, Value};
|
use mlua::{ExternalError, IntoLua, Lua, MultiValue, Table, Value};
|
||||||
use ordered_float::OrderedFloat;
|
use ordered_float::OrderedFloat;
|
||||||
use yazi_shared::{event::{Data, DataKey}, replace_cow};
|
use yazi_shared::{event::{Data, DataKey}, replace_cow};
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
use std::{collections::HashMap, str::FromStr, time::Duration};
|
use std::{str::FromStr, time::Duration};
|
||||||
|
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
|
use hashbrown::HashMap;
|
||||||
use parking_lot::RwLock;
|
use parking_lot::RwLock;
|
||||||
use tokio::{io::{AsyncBufReadExt, AsyncWriteExt, BufReader}, select, sync::mpsc::{self, UnboundedReceiver}, task::JoinHandle, time};
|
use tokio::{io::{AsyncBufReadExt, AsyncWriteExt, BufReader}, select, sync::mpsc::{self, UnboundedReceiver}, task::JoinHandle, time};
|
||||||
use yazi_macro::try_format;
|
use yazi_macro::try_format;
|
||||||
|
|
@ -51,7 +52,7 @@ impl Server {
|
||||||
|
|
||||||
let mut parts = line.splitn(4, ',');
|
let mut parts = line.splitn(4, ',');
|
||||||
let Some(kind) = parts.next() else { continue };
|
let Some(kind) = parts.next() else { continue };
|
||||||
let Some(receiver) = parts.next().and_then(|s| s.parse().ok()) else { continue };
|
let Some(receiver) = parts.next().and_then(|s| s.parse::<Id>().ok()) else { continue };
|
||||||
let Some(sender) = parts.next().and_then(|s| s.parse::<u64>().ok()) else { continue };
|
let Some(sender) = parts.next().and_then(|s| s.parse::<u64>().ok()) else { continue };
|
||||||
|
|
||||||
let clients = CLIENTS.read();
|
let clients = CLIENTS.read();
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
use std::{collections::HashMap, mem, ops::Deref, sync::atomic::{AtomicU64, Ordering}, time::UNIX_EPOCH};
|
use std::{mem, ops::Deref, sync::atomic::{AtomicU64, Ordering}, time::UNIX_EPOCH};
|
||||||
|
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
|
use hashbrown::HashMap;
|
||||||
use parking_lot::RwLock;
|
use parking_lot::RwLock;
|
||||||
use tokio::io::{AsyncBufReadExt, AsyncWriteExt, BufWriter};
|
use tokio::io::{AsyncBufReadExt, AsyncWriteExt, BufWriter};
|
||||||
use yazi_boot::BOOT;
|
use yazi_boot::BOOT;
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ bitflags = { workspace = true }
|
||||||
dirs = { workspace = true }
|
dirs = { workspace = true }
|
||||||
foldhash = { workspace = true }
|
foldhash = { workspace = true }
|
||||||
futures = { workspace = true }
|
futures = { workspace = true }
|
||||||
|
hashbrown = { workspace = true }
|
||||||
parking_lot = { workspace = true }
|
parking_lot = { workspace = true }
|
||||||
regex = { workspace = true }
|
regex = { workspace = true }
|
||||||
scopeguard = { workspace = true }
|
scopeguard = { workspace = true }
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
use std::{collections::{HashMap, HashSet}, mem, ops::{Deref, DerefMut, Not}};
|
use std::{mem, ops::{Deref, DerefMut, Not}};
|
||||||
|
|
||||||
|
use hashbrown::{HashMap, HashSet};
|
||||||
use tokio::{select, sync::mpsc::{self, UnboundedReceiver}};
|
use tokio::{select, sync::mpsc::{self, UnboundedReceiver}};
|
||||||
use yazi_shared::{Id, url::{UrlBuf, Urn, UrnBuf}};
|
use yazi_shared::{Id, url::{UrlBuf, Urn, UrnBuf}};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,9 @@
|
||||||
// FIXME: VFS
|
// FIXME: VFS
|
||||||
|
|
||||||
use std::{borrow::Cow, collections::{HashMap, HashSet}, ffi::{OsStr, OsString}, path::{Path, PathBuf}};
|
use std::{borrow::Cow, ffi::{OsStr, OsString}, path::{Path, PathBuf}};
|
||||||
|
|
||||||
use anyhow::{Result, bail};
|
use anyhow::{Result, bail};
|
||||||
|
use hashbrown::{HashMap, HashSet};
|
||||||
use tokio::{fs, io, select, sync::{mpsc, oneshot}, time};
|
use tokio::{fs, io, select, sync::{mpsc, oneshot}, time};
|
||||||
use yazi_shared::url::{Component, Url, UrlBuf};
|
use yazi_shared::url::{Component, Url, UrlBuf};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
use std::{borrow::Cow, collections::{HashMap, HashSet}, ffi::{OsStr, OsString}, os::{fd::AsFd, unix::{ffi::{OsStrExt, OsStringExt}, fs::MetadataExt}}, time::Duration};
|
use std::{borrow::Cow, ffi::{OsStr, OsString}, os::{fd::AsFd, unix::{ffi::{OsStrExt, OsStringExt}, fs::MetadataExt}}, time::Duration};
|
||||||
|
|
||||||
use anyhow::{Context, Result};
|
use anyhow::{Context, Result};
|
||||||
|
use hashbrown::{HashMap, HashSet};
|
||||||
use tokio::{io::{Interest, unix::AsyncFd}, time::sleep};
|
use tokio::{io::{Interest, unix::AsyncFd}, time::sleep};
|
||||||
use tracing::error;
|
use tracing::error;
|
||||||
use yazi_shared::{natsort, replace_cow, replace_vec_cow};
|
use yazi_shared::{natsort, replace_cow, replace_vec_cow};
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ pub static PARTITIONS: RoCell<Locked> = RoCell::new();
|
||||||
pub struct Partitions {
|
pub struct Partitions {
|
||||||
pub(super) inner: Vec<Partition>,
|
pub(super) inner: Vec<Partition>,
|
||||||
#[cfg(target_os = "linux")]
|
#[cfg(target_os = "linux")]
|
||||||
pub(super) linux_cache: std::collections::HashSet<String>,
|
pub(super) linux_cache: hashbrown::HashSet<String>,
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
pub(super) need_update: bool,
|
pub(super) need_update: bool,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
use std::collections::{HashMap, HashSet};
|
use hashbrown::{HashMap, HashSet};
|
||||||
|
|
||||||
use yazi_macro::relay;
|
use yazi_macro::relay;
|
||||||
use yazi_shared::{Id, Ids, url::{UrlBuf, UrnBuf}};
|
use yazi_shared::{Id, Ids, url::{UrlBuf, UrnBuf}};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
use std::{cmp::Ordering, collections::HashMap};
|
use std::cmp::Ordering;
|
||||||
|
|
||||||
|
use hashbrown::HashMap;
|
||||||
use yazi_shared::{LcgRng, natsort, translit::Transliterator, url::UrnBuf};
|
use yazi_shared::{LcgRng, natsort, translit::Transliterator, url::UrnBuf};
|
||||||
|
|
||||||
use crate::{File, SortBy};
|
use crate::{File, SortBy};
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
use std::{collections::HashMap, fmt::Debug};
|
use std::fmt::Debug;
|
||||||
|
|
||||||
use anyhow::bail;
|
use anyhow::bail;
|
||||||
|
use hashbrown::HashMap;
|
||||||
use mlua::{Lua, Table};
|
use mlua::{Lua, Table};
|
||||||
use yazi_shared::{SStr, event::{Cmd, CmdCow, Data, DataKey}};
|
use yazi_shared::{SStr, event::{Cmd, CmdCow, Data, DataKey}};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
use std::collections::HashMap;
|
|
||||||
|
|
||||||
use anyhow::bail;
|
use anyhow::bail;
|
||||||
|
use hashbrown::HashMap;
|
||||||
use mlua::{ExternalError, FromLua, IntoLua, Lua, Value};
|
use mlua::{ExternalError, FromLua, IntoLua, Lua, Value};
|
||||||
use yazi_shared::event::{CmdCow, Data, DataKey};
|
use yazi_shared::event::{CmdCow, Data, DataKey};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@ yazi-widgets = { path = "../yazi-widgets", version = "25.6.11" }
|
||||||
anyhow = { workspace = true }
|
anyhow = { workspace = true }
|
||||||
crossterm = { workspace = true }
|
crossterm = { workspace = true }
|
||||||
futures = { workspace = true }
|
futures = { workspace = true }
|
||||||
|
hashbrown = { workspace = true }
|
||||||
mlua = { workspace = true }
|
mlua = { workspace = true }
|
||||||
parking_lot = { workspace = true }
|
parking_lot = { workspace = true }
|
||||||
paste = { workspace = true }
|
paste = { workspace = true }
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
use std::{borrow::Cow, collections::HashMap, ops::Deref};
|
use std::{borrow::Cow, ops::Deref};
|
||||||
|
|
||||||
use anyhow::{Context, Result, bail};
|
use anyhow::{Context, Result, bail};
|
||||||
|
use hashbrown::HashMap;
|
||||||
use mlua::{ChunkMode, ExternalError, Lua, Table};
|
use mlua::{ChunkMode, ExternalError, Lua, Table};
|
||||||
use parking_lot::RwLock;
|
use parking_lot::RwLock;
|
||||||
use yazi_boot::BOOT;
|
use yazi_boot::BOOT;
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ yazi-shared = { path = "../yazi-shared", version = "25.6.11" }
|
||||||
anyhow = { workspace = true }
|
anyhow = { workspace = true }
|
||||||
async-priority-channel = "0.2.0"
|
async-priority-channel = "0.2.0"
|
||||||
futures = { workspace = true }
|
futures = { workspace = true }
|
||||||
|
hashbrown = { workspace = true }
|
||||||
lru = { workspace = true }
|
lru = { workspace = true }
|
||||||
parking_lot = { workspace = true }
|
parking_lot = { workspace = true }
|
||||||
scopeguard = { workspace = true }
|
scopeguard = { workspace = true }
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
use std::collections::HashMap;
|
|
||||||
|
|
||||||
use futures::future::BoxFuture;
|
use futures::future::BoxFuture;
|
||||||
|
use hashbrown::HashMap;
|
||||||
use yazi_shared::Id;
|
use yazi_shared::Id;
|
||||||
|
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
use std::collections::HashMap;
|
use hashbrown::HashMap;
|
||||||
|
|
||||||
use yazi_config::YAZI;
|
use yazi_config::YAZI;
|
||||||
use yazi_parser::app::TasksProgress;
|
use yazi_parser::app::TasksProgress;
|
||||||
use yazi_shared::{Id, Ids};
|
use yazi_shared::{Id, Ids};
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
use std::{collections::{HashMap, HashSet}, num::NonZeroUsize};
|
use std::num::NonZeroUsize;
|
||||||
|
|
||||||
use anyhow::{Result, anyhow};
|
use anyhow::{Result, anyhow};
|
||||||
|
use hashbrown::{HashMap, HashSet};
|
||||||
use lru::LruCache;
|
use lru::LruCache;
|
||||||
use parking_lot::{Mutex, RwLock};
|
use parking_lot::{Mutex, RwLock};
|
||||||
use tokio::sync::mpsc;
|
use tokio::sync::mpsc;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
use std::{any::Any, borrow::Cow, collections::HashMap, fmt::{self, Display}, mem, str::FromStr};
|
use std::{any::Any, borrow::Cow, fmt::{self, Display}, mem, str::FromStr};
|
||||||
|
|
||||||
use anyhow::{Result, anyhow, bail};
|
use anyhow::{Result, anyhow, bail};
|
||||||
|
use hashbrown::HashMap;
|
||||||
use serde::{Deserialize, de};
|
use serde::{Deserialize, de};
|
||||||
|
|
||||||
use super::{Data, DataKey};
|
use super::{Data, DataKey};
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
use std::{any::Any, borrow::Cow, collections::HashMap};
|
use std::{any::Any, borrow::Cow};
|
||||||
|
|
||||||
use anyhow::{Result, bail};
|
use anyhow::{Result, bail};
|
||||||
|
use hashbrown::HashMap;
|
||||||
use ordered_float::OrderedFloat;
|
use ordered_float::OrderedFloat;
|
||||||
use serde::{Deserialize, Serialize, de};
|
use serde::{Deserialize, Serialize, de};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue