SimpleUsbTerminal icon indicating copy to clipboard operation
SimpleUsbTerminal copied to clipboard

The application may be doing too much work on its main thread

Open AbdullahFaraedoonOmer opened this issue 4 years ago • 1 comments

Hello friend how I can fix this, the UI become very slow when receive a lot of data and append it to TextView I/Choreographer: Skipped 31 frames! The application may be doing too much work on its main thread.

AbdullahFaraedoonOmer avatar Mar 12 '21 20:03 AbdullahFaraedoonOmer

instead of posting each data fragment to the message queue here: https://github.com/kai-morich/SimpleUsbTerminal/blob/ed4cf127908aee07f666fcb9073552b22ac54ad5/app/src/main/java/de/kai_morich/simple_usb_terminal/SerialService.java#L216 new data could be appended to the last message if it was not processed yet in the UI thread, with some additional synchronization logic

kai-morich avatar Mar 13 '21 10:03 kai-morich

number of UI updates is reduced with: 7b88a50

kai-morich avatar Nov 14 '22 06:11 kai-morich