node.jssocket.ioraspberry-piraspbianfirmata

Node.js with socket.io and firmata on raspbian (model B) runs slow


I´m running a Raspberry Pi Model B (512MB RAM) with a 16 gB 300MB/s SD-card and recent raspbian with all updates.

On this machine I´ve set up a apache2-server, node.js with socket.io and firmata.

Within my web-application, video streaming is a key feature.

When I access my webserver just for streaming the videos (without node/socket.io/firmata), everything streams with a good performance. But when I switch on node.js/socket.io/firmata it's rather slow, it takes 5-7 seconds to start streaming the videos.

I had problems installing node.js in the first place. Node.js from source compiled/installed like a charm, but when I tried to run it, I got this mysterious "Illegal instruction" message.

As an alternative I took the precompiled debian-packages and installed them using dpkg using this repo:

http://revryl.com/2014/01/04/nodejs-raspberry-pi/

They say that nodejs will run slower, but that´s not acceptable for me.

Any hints?

Thanks and regards!


Solution

  • Allright, it´s faster now. For everyone with this issue: