From f2df698e3bfa856acecddc1fade398763795dc2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Tue, 5 May 2020 10:10:21 +0200 Subject: [PATCH] EventIndex: Reduce the logging the event index is producing. --- src/indexing/EventIndex.js | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/src/indexing/EventIndex.js b/src/indexing/EventIndex.js index a6bbbb5f96..eed9837a7a 100644 --- a/src/indexing/EventIndex.js +++ b/src/indexing/EventIndex.js @@ -102,9 +102,6 @@ export default class EventIndex extends EventEmitter { const timeline = room.getLiveTimeline(); const token = timeline.getPaginationToken("b"); - console.log("EventIndex: Got token for indexer", - room.roomId, token); - const backCheckpoint = { roomId: room.roomId, token: token, @@ -161,7 +158,6 @@ export default class EventIndex extends EventEmitter { if (prevState === "SYNCING" && state === "SYNCING") { // A sync was done, presumably we queued up some live events, // commit them now. - console.log("EventIndex: Committing events"); await indexManager.commitLiveEvents(); return; } @@ -336,8 +332,6 @@ export default class EventIndex extends EventEmitter { async crawlerFunc() { let cancelled = false; - console.log("EventIndex: Started crawler function"); - const client = MatrixClientPeg.get(); const indexManager = PlatformPeg.get().getEventIndexingManager(); @@ -366,8 +360,6 @@ export default class EventIndex extends EventEmitter { await sleep(sleepTime); - console.log("EventIndex: Running the crawler loop."); - if (cancelled) { break; } @@ -386,8 +378,6 @@ export default class EventIndex extends EventEmitter { idle = false; - console.log("EventIndex: crawling using checkpoint", checkpoint); - // We have a checkpoint, let us fetch some messages, again, very // conservatively to not bother our homeserver too much. const eventMapper = client.getEventMapper({preventReEmit: true}); @@ -511,15 +501,6 @@ export default class EventIndex extends EventEmitter { 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 { for (let i = 0; i < redactionEvents.length; i++) { const ev = redactionEvents[i]; @@ -552,8 +533,6 @@ export default class EventIndex extends EventEmitter { } this._crawler = null; - - console.log("EventIndex: Stopping crawler function"); } /**