'How much CPU usage is normal for RealTime electron APP

I wrote a electron app for a device from aliexpress (simple spectrum analyzer), and I feed the data to the app through some dlls etc. That is not that important, but just so you know what it is. Important is, that it goes to the app as JSON and the app renders it using lightning chart.js.

My questions is, how much CPU should real-time app like this take? Mine sits around 19% on Ryzen5 2600, which to me seems like a lot and most of the CPU is taken by the event handler in the renderer process alone, even if I remove the rendering part on the chart component and just transfer the data to the renderer from my forked process through the main process the usage is high. I am new to javascript so I tried doing 30s performance snapshot from devtools and I am not sure if it helped me or not. Summary of performance recording

Is there a better solution to transfer large data from forked process to the renderer without compromising on security by turning nodeIntegration on? The data are a Buffer of 65k bytes which I then convert to the JSON in the forked process and pass through all the IPC to the renderer. I need the forked process so the app is not blocked if there is connection issue between the device and the app.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source