summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2023-04-12 13:48:55 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2023-04-12 13:48:55 +0200
commit8152191277ca0fb740a051e99c482c9b90c65a8b (patch)
tree8e98daf620d564bf322bb01ae8a567a587cf5e4a
parent8c6c909e98e2ac3831c9a3c07050f8997a51ea11 (diff)
ui: further reduce log viewer memory usage
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r--ui/src/main/java/com/wireguard/android/activity/LogViewerActivity.kt3
1 files changed, 1 insertions, 2 deletions
diff --git a/ui/src/main/java/com/wireguard/android/activity/LogViewerActivity.kt b/ui/src/main/java/com/wireguard/android/activity/LogViewerActivity.kt
index acb2cd21..36925bea 100644
--- a/ui/src/main/java/com/wireguard/android/activity/LogViewerActivity.kt
+++ b/ui/src/main/java/com/wireguard/android/activity/LogViewerActivity.kt
@@ -158,7 +158,6 @@ class LogViewerActivity : AppCompatActivity() {
builder.append('\n')
}
val ret = builder.toString().toByteArray(Charsets.UTF_8)
- builder.clear()
return ret
}
@@ -203,7 +202,7 @@ class LogViewerActivity : AppCompatActivity() {
var priorModified = false
val bufferedLogLines = arrayListOf<LogLine>()
var timeout = 1000000000L / 2 // The timeout is initially small so that the view gets populated immediately.
- val MAX_LINES = (1 shl 17) - 1
+ val MAX_LINES = (1 shl 16) - 1
val MAX_BUFFERED_LINES = (1 shl 14) - 1
while (true) {