mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-12 22:17:22 +01:00
performance optimizations
This commit is contained in:
parent
afb1cf1429
commit
a75ff627b8
8 changed files with 45 additions and 104 deletions
|
|
@ -220,10 +220,6 @@ namespace MareSynchronos.UI
|
|||
|
||||
if (!_fileCacheManager.IsScanRunning && !string.IsNullOrEmpty(_pluginConfiguration.CacheFolder) && _uiShared.HasValidPenumbraModPath && Directory.Exists(_pluginConfiguration.CacheFolder))
|
||||
{
|
||||
UiShared.TextWrapped("You can adjust how many parallel threads will be used for scanning. Mind that ultimately it will depend on the amount of mods, your disk speed and your CPU. " +
|
||||
"More is not necessarily better, the default of 10 should be fine for most cases.");
|
||||
_uiShared.DrawParallelScansSetting();
|
||||
|
||||
if (ImGui.Button("Start Scan##startScan"))
|
||||
{
|
||||
_fileCacheManager.InvokeScan(true);
|
||||
|
|
|
|||
|
|
@ -586,7 +586,6 @@ namespace MareSynchronos.UI
|
|||
private void DrawFileCacheSettings()
|
||||
{
|
||||
_uiShared.DrawFileScanState();
|
||||
_uiShared.DrawParallelScansSetting();
|
||||
_uiShared.DrawTimeSpanBetweenScansSetting();
|
||||
_uiShared.DrawCacheDirectorySetting();
|
||||
ImGui.Text($"Local cache size: {UiShared.ByteToString(_uiShared.FileCacheSize)}");
|
||||
|
|
|
|||
|
|
@ -520,17 +520,6 @@ namespace MareSynchronos.UI
|
|||
_cacheScanner.InvokeScan(true);
|
||||
}
|
||||
|
||||
public void DrawParallelScansSetting()
|
||||
{
|
||||
var parallelScans = _pluginConfiguration.MaxParallelScan;
|
||||
if (ImGui.SliderInt("File scan parallelism##parallelism", ref parallelScans, 1, 20))
|
||||
{
|
||||
_pluginConfiguration.MaxParallelScan = parallelScans;
|
||||
_pluginConfiguration.Save();
|
||||
}
|
||||
DrawHelpText("Decrease to lessen load of file scans. File scans will take longer to execute with less parallel threads.");
|
||||
}
|
||||
|
||||
public void DrawTimeSpanBetweenScansSetting()
|
||||
{
|
||||
var timeSpan = _pluginConfiguration.TimeSpanBetweenScansInSeconds;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue