Skip to content

Commit 8152191

Browse files
committed
ui: further reduce log viewer memory usage
Signed-off-by: Jason A. Donenfeld <[email protected]>
1 parent 8c6c909 commit 8152191

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

ui/src/main/java/com/wireguard/android/activity/LogViewerActivity.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ class LogViewerActivity : AppCompatActivity() {
158158
builder.append('\n')
159159
}
160160
val ret = builder.toString().toByteArray(Charsets.UTF_8)
161-
builder.clear()
162161
return ret
163162
}
164163

@@ -203,7 +202,7 @@ class LogViewerActivity : AppCompatActivity() {
203202
var priorModified = false
204203
val bufferedLogLines = arrayListOf<LogLine>()
205204
var timeout = 1000000000L / 2 // The timeout is initially small so that the view gets populated immediately.
206-
val MAX_LINES = (1 shl 17) - 1
205+
val MAX_LINES = (1 shl 16) - 1
207206
val MAX_BUFFERED_LINES = (1 shl 14) - 1
208207

209208
while (true) {

0 commit comments

Comments
 (0)