EventIndex: Reduce the logging the event index is producing.

This commit is contained in:
Damir Jelić 2020-05-05 10:10:21 +02:00
parent 5ac5c056e3
commit f2df698e3b

View file

@ -102,9 +102,6 @@ export default class EventIndex extends EventEmitter {
const timeline = room.getLiveTimeline(); const timeline = room.getLiveTimeline();
const token = timeline.getPaginationToken("b"); const token = timeline.getPaginationToken("b");
console.log("EventIndex: Got token for indexer",
room.roomId, token);
const backCheckpoint = { const backCheckpoint = {
roomId: room.roomId, roomId: room.roomId,
token: token, token: token,
@ -161,7 +158,6 @@ export default class EventIndex extends EventEmitter {
if (prevState === "SYNCING" && state === "SYNCING") { if (prevState === "SYNCING" && state === "SYNCING") {
// A sync was done, presumably we queued up some live events, // A sync was done, presumably we queued up some live events,
// commit them now. // commit them now.
console.log("EventIndex: Committing events");
await indexManager.commitLiveEvents(); await indexManager.commitLiveEvents();
return; return;
} }
@ -336,8 +332,6 @@ export default class EventIndex extends EventEmitter {
async crawlerFunc() { async crawlerFunc() {
let cancelled = false; let cancelled = false;
console.log("EventIndex: Started crawler function");
const client = MatrixClientPeg.get(); const client = MatrixClientPeg.get();
const indexManager = PlatformPeg.get().getEventIndexingManager(); const indexManager = PlatformPeg.get().getEventIndexingManager();
@ -366,8 +360,6 @@ export default class EventIndex extends EventEmitter {
await sleep(sleepTime); await sleep(sleepTime);
console.log("EventIndex: Running the crawler loop.");
if (cancelled) { if (cancelled) {
break; break;
} }
@ -386,8 +378,6 @@ export default class EventIndex extends EventEmitter {
idle = false; idle = false;
console.log("EventIndex: crawling using checkpoint", checkpoint);
// We have a checkpoint, let us fetch some messages, again, very // We have a checkpoint, let us fetch some messages, again, very
// conservatively to not bother our homeserver too much. // conservatively to not bother our homeserver too much.
const eventMapper = client.getEventMapper({preventReEmit: true}); const eventMapper = client.getEventMapper({preventReEmit: true});
@ -511,15 +501,6 @@ export default class EventIndex extends EventEmitter {
direction: checkpoint.direction, direction: checkpoint.direction,
}; };
console.log(
"EventIndex: Crawled room",
client.getRoom(checkpoint.roomId).name,
"and fetched total", matrixEvents.length, "events of which",
events.length, "are being added,", redactionEvents.length,
"are redacted,", matrixEvents.length - events.length,
"are being skipped, undecryptable", undecryptableEvents.length,
);
try { try {
for (let i = 0; i < redactionEvents.length; i++) { for (let i = 0; i < redactionEvents.length; i++) {
const ev = redactionEvents[i]; const ev = redactionEvents[i];
@ -552,8 +533,6 @@ export default class EventIndex extends EventEmitter {
} }
this._crawler = null; this._crawler = null;
console.log("EventIndex: Stopping crawler function");
} }
/** /**