Getting some data from a hardware device via bluetooth in every 10 milliseconds. Performing some heavy task like merging data, parsing, building list and setting into state to show data into table and graph.
The issue is UI is freezing while receiving data from bluetooth. Not able to perform touch in UI but data is rendering in UI.
BluetoothService.getInstance().monitorRecord((record: Record) => {// This is a callback calling in every 10 milliseconds //setting record into state, setting record into state is taking 100+ milliseconds setRecord(record); // Preparing suitable data fro graph this is taking 2 milliseconds prepareDataFroGraph(record); //building list of record this will taking 2 milliseconds recordData(record); }, TransactionId.MONITOR_RECORD)