hiroyuki / ofxArtnet

ultra simple artnet addon for openFrameworks
MIT License
68 stars 31 forks source link

100% CPU core with ofxUDPManager set at non-blocking #36

Open artificiel opened 2 years ago

artificiel commented 2 years ago

An application receiving ofxArtnet will consume 100% of a CPU core just waiting for the data (on a Mac M1, it means about 200000 loops per seconds of the threadedFunction() . In ofxArtnetReceiver::setup() changingsettings.blocking to false drops the % to ~5%.

I don't mind preparing a pull request but I don't know what the default should be (I personally don't see a latency issue with blocking enabled so I use that) but either change the default and/or add a method or setup parameter to specify blocking?