Verbosity
2 files changed, 7 insertions, 3 deletions
diff --git a/LibMatrix/Helpers/SyncHelper.cs b/LibMatrix/Helpers/SyncHelper.cs
index 862c8ad..6488464 100644
--- a/LibMatrix/Helpers/SyncHelper.cs
+++ b/LibMatrix/Helpers/SyncHelper.cs
@@ -25,6 +25,10 @@ public class SyncHelper(AuthenticatedHomeserverGeneric homeserver, ILogger? logg
public string? Since { get; set; }
public int Timeout { get; set; } = 30000;
public string? SetPresence { get; set; } = "online";
+
+ /// <summary>
+ /// Disabling this uses a technically slower code path, useful for checking whether delay comes from waiting for server or deserialising responses
+ /// </summary>
public bool UseInternalStreamingSync { get; set; } = true;
public bool UseMsc4222StateAfter {
diff --git a/LibMatrix/Helpers/SyncProcessors/Msc4222EmulationSyncProcessor.cs b/LibMatrix/Helpers/SyncProcessors/Msc4222EmulationSyncProcessor.cs
index f9f6ba3..9baeaa4 100644
--- a/LibMatrix/Helpers/SyncProcessors/Msc4222EmulationSyncProcessor.cs
+++ b/LibMatrix/Helpers/SyncProcessors/Msc4222EmulationSyncProcessor.cs
@@ -29,11 +29,11 @@ public class Msc4222EmulationSyncProcessor(AuthenticatedHomeserverGeneric homese
var modified = false;
List<Task<bool>> tasks = [];
if (resp.Rooms is { Join.Count: > 0 }) {
- tasks.AddRange(resp.Rooms.Join.Select(ProcessJoinedRooms));
+ tasks.AddRange(resp.Rooms.Join.Select(ProcessJoinedRooms).ToList());
}
if (resp.Rooms is { Leave.Count: > 0 }) {
- tasks.AddRange(resp.Rooms.Leave.Select(ProcessLeftRooms));
+ tasks.AddRange(resp.Rooms.Leave.Select(ProcessLeftRooms).ToList());
}
var tasksEnum = tasks.ToAsyncEnumerable();
@@ -43,7 +43,7 @@ public class Msc4222EmulationSyncProcessor(AuthenticatedHomeserverGeneric homese
}
}
- Console.WriteLine($"Msc4222EmulationSyncProcessor.EmulateMsc4222 processed {resp.Rooms?.Join?.Count}/{resp.Rooms?.Leave?.Count} rooms in {sw.Elapsed}");
+ Console.WriteLine($"Msc4222EmulationSyncProcessor.EmulateMsc4222 processed {resp.Rooms?.Join?.Count}/{resp.Rooms?.Leave?.Count} rooms in {sw.Elapsed} (modified: {modified})");
if (modified)
resp.Msc4222Method = SyncResponse.Msc4222SyncType.Emulated;
|