forked from cory/tildefriends
Needs more work, but several experiments that make things more responsive under load.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3783 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
@ -202,9 +202,12 @@ ssb.addRpc(['tunnel', 'isRoom'], function(request) {
|
||||
function ebtReplicateSendClock(request, have) {
|
||||
var me = ssb.whoami();
|
||||
var message = {};
|
||||
var last_sent = request.connection.sent_clock || {};
|
||||
var ids = followingDeep(g_database, [me], 2).concat([request.connection.id]);
|
||||
for (let id of ids) {
|
||||
message[id] = get_latest_sequence_for_author(id);
|
||||
if (!last_sent) {
|
||||
for (let id of ids) {
|
||||
message[id] = get_latest_sequence_for_author(id);
|
||||
}
|
||||
}
|
||||
for (let id of Object.keys(have)) {
|
||||
if (message[id] === undefined) {
|
||||
@ -213,7 +216,6 @@ function ebtReplicateSendClock(request, have) {
|
||||
}
|
||||
}
|
||||
|
||||
var last_sent = request.connection.sent_clock || {};
|
||||
var to_send = {}
|
||||
for (let id of ids) {
|
||||
if (last_sent[id] === undefined || message[id] > last_sent[id]) {
|
||||
|
Reference in New Issue
Block a user