speed up connection speed a good bit

loading save state was slow so now theres a temporary lookup table
This commit is contained in:
ouwou committed 2021-12-31 16:42:06 -05:00
1 parent b576bd0fcc
commit 5338eab3a5
3 files changed
+22 -10

No files matched your search

+5 -1
View File
@@ -388,7 +388,11 @@ void Abaddon::SaveState() {
}
void Abaddon::LoadState() {
if (!GetSettings().SaveState) return;
if (!GetSettings().SaveState) {
// call with empty data to purge the temporary table
m_main_window->GetChannelList()->UseExpansionState({});
return;
}
const auto data = ReadWholeFile(GetStateCachePath("/state.json"));
if (data.empty()) return;