state-res: Remove dead code and stale comments
This commit is contained in:
parent
318f3186ad
commit
b7d0970335
@ -76,3 +76,29 @@ resolve state of 10 events 3 conflicting
|
||||
Found 7 outliers among 100 measurements (7.00%)
|
||||
5 (5.00%) high mild
|
||||
2 (2.00%) high severe
|
||||
|
||||
7/20/2021 BRANCH stateres-result REV:
|
||||
This marks the switch to HashSet/Map
|
||||
lexicographical topological sort
|
||||
time: [1.8122 us 1.8177 us 1.8233 us]
|
||||
change: [+15.205% +15.919% +16.502%] (p = 0.00 < 0.05)
|
||||
Performance has regressed.
|
||||
Found 7 outliers among 100 measurements (7.00%)
|
||||
5 (5.00%) high mild
|
||||
2 (2.00%) high severe
|
||||
|
||||
resolve state of 5 events one fork
|
||||
time: [11.966 us 12.010 us 12.059 us]
|
||||
change: [+16.089% +16.730% +17.469%] (p = 0.00 < 0.05)
|
||||
Performance has regressed.
|
||||
Found 7 outliers among 100 measurements (7.00%)
|
||||
3 (3.00%) high mild
|
||||
4 (4.00%) high severe
|
||||
|
||||
resolve state of 10 events 3 conflicting
|
||||
time: [29.092 us 29.201 us 29.311 us]
|
||||
change: [+12.447% +12.847% +13.280%] (p = 0.00 < 0.05)
|
||||
Performance has regressed.
|
||||
Found 9 outliers among 100 measurements (9.00%)
|
||||
6 (6.00%) high mild
|
||||
3 (3.00%) high severe
|
||||
|
@ -84,23 +84,6 @@ impl StateResolution {
|
||||
info!("conflicting events: {}", conflicting.len());
|
||||
debug!("{:?}", conflicting);
|
||||
|
||||
let mut iter = conflicting.values();
|
||||
let mut conflicting_state_sets = iter
|
||||
.next()
|
||||
.expect("we made sure conflicting is not empty")
|
||||
.iter()
|
||||
.map(|o| if let Some(e) = o { hashset![e.clone()] } else { HashSet::new() })
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
for events in iter {
|
||||
for i in 0..events.len() {
|
||||
// This is okay because all vecs have the same length = number of states
|
||||
if let Some(e) = &events[i] {
|
||||
conflicting_state_sets[i].insert(e.clone());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// The set of auth events that are not common across server forks
|
||||
let mut auth_diff = StateResolution::get_auth_chain_diff(room_id, auth_chain_sets)?;
|
||||
|
||||
@ -377,8 +360,6 @@ impl StateResolution {
|
||||
let event = fetch_event(event_id);
|
||||
let mut pl = None;
|
||||
|
||||
// TODO store.auth_event_ids returns "self" with the event ids is this ok
|
||||
// event.auth_event_ids does not include its own event id ?
|
||||
for aid in event.as_ref().map(|pdu| pdu.auth_events()).unwrap_or_default() {
|
||||
if let Some(aev) = fetch_event(&aid) {
|
||||
if is_type_and_key(&aev, EventType::RoomPowerLevels, "") {
|
||||
|
@ -26,9 +26,6 @@ fn test_event_sort() {
|
||||
.map(|pdu| pdu.event_id().clone())
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
// This is a TODO in conduit
|
||||
// TODO these events are not guaranteed to be sorted but they are resolved, do
|
||||
// we need the auth_chain
|
||||
let sorted_power_events =
|
||||
StateResolution::reverse_topological_power_sort(&power_events, &auth_chain, |id| {
|
||||
events.get(id).map(Arc::clone)
|
||||
|
Loading…
x
Reference in New Issue
Block a user