make sure to not create more thumbnail workers than available CPU cores
This commit is contained in:
parent
bf7b9c192c
commit
4df14044aa
1 changed files with 1 additions and 1 deletions
|
|
@ -105,7 +105,7 @@ const THUMBNAIL_SIZE: u32 = (ICON_SIZE_GRID as u32) * (ICON_SCALE_MAX as u32);
|
|||
// Thumbnail generation semaphore - limits parallel thumbnail workers
|
||||
// Uses 4 workers for balanced throughput and memory usage
|
||||
pub static THUMB_SEMAPHORE: LazyLock<tokio::sync::Semaphore> =
|
||||
LazyLock::new(|| tokio::sync::Semaphore::const_new(4));
|
||||
LazyLock::new(|| tokio::sync::Semaphore::const_new(num_cpus::get().min(4)));
|
||||
|
||||
pub(crate) static SORT_OPTION_FALLBACK: LazyLock<FxHashMap<String, (HeadingOptions, bool)>> =
|
||||
LazyLock::new(|| {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue