1
Vote

High CPU usage

description

I notice a consistent usage of 25% CPU usage (Core2 Quad @ 2.33). CPU time is more or less constant even when the Arduino is not sending/receiving data.
 
It seems like it shouldn't use any CPU at all, considering that it is event based.
 
Repro:
 
 
 
        using (var arduino = new Arduino("COM36"))
        {
            arduino.Connect();
 
            Console.WriteLine("Press <enter> to end.");
            Console.ReadLine();
        }

comments

asti0 wrote Feb 2, 2012 at 11:44 AM

Checked out the source.
Turns out it wasn't event based. There's a while(true) loop on the Task Pool. For the life of me I have no idea why you would use polling.

wrote Feb 14, 2013 at 6:58 PM