Finish optimizing channel representations and operations

This commit is contained in:
Mikayla 2023-09-18 20:24:33 -07:00
parent 5f9c56c8b0
commit dadad397ef
No known key found for this signature in database
10 changed files with 132 additions and 118 deletions

View file

@ -805,21 +805,18 @@ impl ChannelStore {
}
}
let mut index_edit = self.channel_index.bulk_edit();
dbg!(&index_edit);
let mut index = self.channel_index.bulk_insert();
for channel in payload.channels {
index_edit.insert(channel)
index.insert(channel)
}
for edge in payload.insert_edge {
index_edit.insert_edge(edge.parent_id, edge.channel_id);
index.insert_edge(edge.channel_id, edge.parent_id);
}
for edge in payload.delete_edge {
index_edit.delete_edge(edge.parent_id, edge.channel_id);
index.delete_edge(edge.parent_id, edge.channel_id);
}
drop(index_edit);
dbg!(&self.channel_index);
}
for permission in payload.channel_permissions {