Commit graph

882 commits

Author SHA1 Message Date
Andrew Jeffery
7fa62da400 CI: Don't test all targets
This unnecessarily runs the benchmarks to ensure they pass.
2021-04-24 14:25:31 -07:00
Andrew Jeffery
8bb14b73d5 Remove unnecessary conditional
We are deduplicating so it shouldn't matter if either is empty.
2021-04-24 14:25:31 -07:00
Andrew Jeffery
7b7ca898b8 Just keep the sync_with_changes benchmark 2021-04-24 14:25:31 -07:00
Andrew Jeffery
b3a7eff559 Use hashset for sent_hashes in js types 2021-04-24 14:25:31 -07:00
Andrew Jeffery
8d3096b823 Make sent_hashes a set instead of a vec
We don't care about the ordering so we can just store them in a hashset
all of the time, avoiding having to rebuild the hashset each time.
2021-04-24 14:25:31 -07:00
Andrew Jeffery
0e9ee417b9 Bump js_tests commit hash 2021-04-24 14:25:31 -07:00
Andrew Jeffery
e3de7d970a Only store hashes in sync_state rather than the actual changes 2021-04-24 14:25:31 -07:00
Andrew Jeffery
d9427da7ae Add total number of syncs to benchmark 2021-04-24 14:25:31 -07:00
Andrew Jeffery
35e6cacbe0 Improve benchmark names again 2021-04-24 14:25:31 -07:00
Andrew Jeffery
b8395339a5 Fix benchmark names 2021-04-24 14:25:31 -07:00
Andrew Jeffery
e2f0b1f15a Fix interval checking 2021-04-24 14:25:31 -07:00
Andrew Jeffery
701f63c624 Separate benchmark into sync and sync with changes 2021-04-24 14:25:31 -07:00
Andrew Jeffery
3c946bd234 Add sync benchmark 2021-04-24 14:25:31 -07:00
Andrew Jeffery
4c7e0c9167 Mutate the SyncState rather than consuming and returning 2021-04-24 14:25:31 -07:00
Andrew Jeffery
90cbbc7cab Fix ordering of receive_sync_message arguments 2021-04-24 14:25:31 -07:00
Andrew Jeffery
1f338393c3 Move SyncHave to state.rs 2021-04-24 14:25:31 -07:00
Andrew Jeffery
7c2fd94c62 Specify some capacities 2021-04-24 14:25:31 -07:00
Andrew Jeffery
d1df9202c7 js_tests: Update commit hash to use sync-protocol-3 branch 2021-04-24 14:25:31 -07:00
Andrew Jeffery
ffea77f985 Add actual binary types 2021-04-24 14:25:31 -07:00
Andrew Jeffery
e58ba342f8 Move state to separate module 2021-04-24 14:25:31 -07:00
Andrew Jeffery
21d19cc909 Move bloom filter to separate module 2021-04-24 14:25:31 -07:00
Andrew Jeffery
aebfdc6572 Update patches with pending_changes 2021-04-24 14:25:31 -07:00
Andrew Jeffery
ef36eba694 Allow passing heads to automerge c backend's get_missing_deps 2021-04-24 14:25:31 -07:00
Andrew Jeffery
d61f1e1c6e Remove our_need and fix default SyncState 2021-04-24 14:25:31 -07:00
Andrew Jeffery
6c93315d74 Make a new types module and add BinaryChange to get uint8array 2021-04-24 14:25:31 -07:00
Andrew Jeffery
0a377a858b Catch up with js changes 2021-04-24 14:25:31 -07:00
Andrew Jeffery
6b424d6e97 Take ownership of have 2021-04-24 14:25:31 -07:00
Andrew Jeffery
220580506d Performance updates
Where we do lots of contains checks we should use hashsets rather than
linear scan through a Vec.

Also tried to minimise some copying.
2021-04-24 14:25:31 -07:00
Andrew Jeffery
f8df532d25 Don't have an old_sync_state, just a sync_state 2021-04-24 14:25:31 -07:00
Andrew Jeffery
0655f7ade6 Remove unused log macro 2021-04-24 14:25:31 -07:00
Andrew Jeffery
f30a14d8f0 Add custom serializer just to get None to map to null 2021-04-24 14:25:31 -07:00
Andrew Jeffery
7c3f52f2e3 Fix need request when head is a false positive 2021-04-24 14:25:31 -07:00
Andrew Jeffery
62f6c6d288 Fix updating sharedHeads when a subset of changes is sent 2021-04-24 14:25:31 -07:00
Andrew Jeffery
6b6135d108 Require vec rather than slice 2021-04-24 14:25:31 -07:00
Andrew Jeffery
85f53685e2 Move to binary representation of changes in api 2021-04-24 14:25:31 -07:00
Andrew Jeffery
fd9e01fd9e Remove unwraps from wasm backend 2021-04-24 14:25:31 -07:00
Andrew Jeffery
7d13091393 Fix bug in get_missing_deps 2021-04-24 14:25:31 -07:00
Andrew Jeffery
68ddb2504e Improve js interop 2021-04-24 14:25:31 -07:00
Andrew Jeffery
646f88c2d2 Reorder receive_sync_message returns in js 2021-04-24 14:25:31 -07:00
Andrew Jeffery
e1bdf34471 More borrowing 2021-04-24 14:25:31 -07:00
Andrew Jeffery
00dcd531c1 Use more references 2021-04-24 14:25:31 -07:00
Andrew Jeffery
3fd548cbe1 Use nicer syntax for repeat 2021-04-24 14:25:31 -07:00
Andrew Jeffery
7573c58521 Implement encodable for slice of change hashes 2021-04-24 14:25:31 -07:00
Andrew Jeffery
69bbd8c64d Remove clone 2021-04-24 14:25:31 -07:00
Andrew Jeffery
469b40e371 Remove unnecessary brackets 2021-04-24 14:25:31 -07:00
Andrew Jeffery
34ede85699 Inline probe as usize 2021-04-24 14:25:31 -07:00
Andrew Jeffery
4dd2d42629 Use builtin function to build u32 from bytes 2021-04-24 14:25:31 -07:00
Andrew Jeffery
9cd146a464 Advance heads only needs slice 2021-04-24 14:25:31 -07:00
Andrew Jeffery
8b4632ae07 Use SyncHave::default 2021-04-24 14:25:31 -07:00
Andrew Jeffery
c5d3572670 Remove unwraps in sync 2021-04-24 14:25:31 -07:00