Description
I have a problem with Electron in combination with serialport. I need to talk to a device which emits frames of 519 bytes at an interval of 27ms and a baudrate of 115200. So nothing spectacular really.
When I run the test code directly in Node it runs fine and uses less than 2% cpu. If I then run the exact same code in Electron my CPU goes through the roof at 130%.
I've tested the code on OSX with iojs v1, v2 and more recently node v4.1.1. The behavior is exactly the same. Also it doesn't make a difference if I run the code in the Electron main or renderer process.
I've shared my test code here. Of course without the device you can't use the serialport test code without altering it a little.
I'm hoping someone can give me pointers on how to investigate further, maybe by profiling the main process? I would love to use Electron for the project but with this bug it's not an option.