mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 18:27:24 +01:00
Improve delayed individual collection loading.
This commit is contained in:
parent
23e553c88e
commit
1ccf3a4256
3 changed files with 10 additions and 7 deletions
2
OtterGui
2
OtterGui
|
|
@ -1 +1 @@
|
|||
Subproject commit 99bd0a889806f0560109686ca3b29a4edfa48f76
|
||||
Subproject commit 4ef03980803cdf5a253c041d6ed1ef26d9a9b938
|
||||
|
|
@ -296,8 +296,8 @@ public class CollectionCacheManager : IDisposable
|
|||
.Prepend(_active.Current)
|
||||
.Prepend(_active.Default)
|
||||
.Prepend(_active.Interface)
|
||||
.Distinct()
|
||||
.Select(c => CreateCache(c) ? Task.Run(() => CalculateEffectiveFileListInternal(c)) : Task.CompletedTask)
|
||||
.Where(CreateCache)
|
||||
.Select(c => Task.Run(() => CalculateEffectiveFileListInternal(c)))
|
||||
.ToArray();
|
||||
|
||||
Task.WaitAll(tasks);
|
||||
|
|
|
|||
|
|
@ -32,11 +32,14 @@ public partial class IndividualCollections
|
|||
if (_actorService.Valid)
|
||||
return ReadJObjectInternal(obj, storage);
|
||||
void Func()
|
||||
{
|
||||
saver.DalamudFramework.RunOnFrameworkThread(() =>
|
||||
{
|
||||
if (ReadJObjectInternal(obj, storage))
|
||||
saver.ImmediateSave(parent);
|
||||
saver.DalamudFramework.RunOnFrameworkThread(() => Loaded.Invoke());
|
||||
Loaded.Invoke();
|
||||
_actorService.FinishedCreation -= Func;
|
||||
});
|
||||
}
|
||||
_actorService.FinishedCreation += Func;
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue