mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
fix issue extracting file thumbnails in parallel
This commit is contained in:
parent
c12dc8e543
commit
be3b74d9bb
1 changed files with 4 additions and 4 deletions
|
|
@ -49,10 +49,10 @@ namespace Flow.Launcher.Infrastructure.Image
|
||||||
{
|
{
|
||||||
Stopwatch.Normal("|ImageLoader.Initialize|Preload images cost", () =>
|
Stopwatch.Normal("|ImageLoader.Initialize|Preload images cost", () =>
|
||||||
{
|
{
|
||||||
foreach (string key in _imageCache.Usage.Keys)
|
ImageCache.Usage.AsParallel().ForAll(x =>
|
||||||
{
|
{
|
||||||
Load(key);
|
Load(x.Key);
|
||||||
}
|
});
|
||||||
});
|
});
|
||||||
Log.Info($"|ImageLoader.Initialize|Number of preload images is <{_imageCache.Usage.Count}>, Images Number: {_imageCache.CacheSize()}, Unique Items {_imageCache.UniqueImagesInCache()}");
|
Log.Info($"|ImageLoader.Initialize|Number of preload images is <{_imageCache.Usage.Count}>, Images Number: {_imageCache.CacheSize()}, Unique Items {_imageCache.UniqueImagesInCache()}");
|
||||||
});
|
});
|
||||||
|
|
@ -172,7 +172,7 @@ namespace Flow.Launcher.Infrastructure.Image
|
||||||
path,
|
path,
|
||||||
Constant.ThumbnailSize,
|
Constant.ThumbnailSize,
|
||||||
Constant.ThumbnailSize,
|
Constant.ThumbnailSize,
|
||||||
ThumbnailOptions.None);
|
ThumbnailOptions.ThumbnailOnly);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue