mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Start adding IDDB in parallel with existing dictionary
This commit is contained in:
@@ -105,6 +105,21 @@ namespace SabreTools.DatFiles
|
||||
|
||||
#region Fields
|
||||
|
||||
/// <summary>
|
||||
/// Get the keys in sorted order from the file dictionary
|
||||
/// </summary>
|
||||
/// <returns>List of the keys in sorted order</returns>
|
||||
[JsonIgnore, XmlIgnore]
|
||||
public string[] SortedKeys
|
||||
{
|
||||
get
|
||||
{
|
||||
List<string> keys = [.. _buckets.Keys];
|
||||
keys.Sort(new NaturalComparer());
|
||||
return keys.ToArray();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// DAT statistics
|
||||
/// </summary>
|
||||
@@ -232,16 +247,6 @@ namespace SabreTools.DatFiles
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get all bucket keys
|
||||
/// </summary>
|
||||
public string[] GetBucketKeys()
|
||||
{
|
||||
List<string> keys = [.. _buckets.Keys];
|
||||
keys.Sort(new NaturalComparer());
|
||||
return keys.ToArray();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get an item based on the index
|
||||
/// </summary>
|
||||
@@ -849,7 +854,7 @@ namespace SabreTools.DatFiles
|
||||
/// <param name="filterRunner">Preconfigured filter runner to use</param>
|
||||
public void ExecuteFilters(FilterRunner filterRunner)
|
||||
{
|
||||
List<string> keys = [.. GetBucketKeys()];
|
||||
List<string> keys = [.. SortedKeys];
|
||||
#if NET452_OR_GREATER || NETCOREAPP
|
||||
Parallel.ForEach(keys, Globals.ParallelOptions, key =>
|
||||
#elif NET40_OR_GREATER
|
||||
|
||||
Reference in New Issue
Block a user