commit 42e5a40

Hubert Hirtz  ·  2021-12-06 12:00:17 +0000 UTC
parent 049101c
Bump history batch limits

Initial history request: 200 -> 500
Infinite scroll request: 100 -> 200
Reconnect request: 200 -> 1000
1 files changed,  +5, -5
M app.go
M app.go
+5, -5
 1@@ -562,7 +562,7 @@ func (app *App) requestHistory() {
 2 			t = bound.first
 3 		}
 4 		s.NewHistoryRequest(buffer).
 5-			WithLimit(100).
 6+			WithLimit(200).
 7 			Before(t)
 8 	}
 9 }
10@@ -656,11 +656,11 @@ func (app *App) handleIRCEvent(netID string, ev interface{}) {
11 		bounds, ok := app.messageBounds[boundKey{netID, ev.Channel}]
12 		if added || !ok {
13 			s.NewHistoryRequest(ev.Channel).
14-				WithLimit(200).
15+				WithLimit(500).
16 				Before(msg.TimeOrNow())
17 		} else {
18 			s.NewHistoryRequest(ev.Channel).
19-				WithLimit(200).
20+				WithLimit(1000).
21 				After(bounds.last)
22 		}
23 		if ev.Requested {
24@@ -728,7 +728,7 @@ func (app *App) handleIRCEvent(netID string, ev interface{}) {
25 		if buffer != "" && !s.IsChannel(buffer) {
26 			if _, added := app.win.AddBuffer(netID, "", buffer); added {
27 				s.NewHistoryRequest(buffer).
28-					WithLimit(200).
29+					WithLimit(500).
30 					Before(msg.TimeOrNow())
31 			}
32 		}
33@@ -753,7 +753,7 @@ func (app *App) handleIRCEvent(netID string, ev interface{}) {
34 			// (precision of the time tag) to include that last message.
35 			last = last.Add(1 * time.Millisecond)
36 			s.NewHistoryRequest(target).
37-				WithLimit(200).
38+				WithLimit(500).
39 				Before(last)
40 		}
41 	case irc.HistoryEvent: