ni-c/heimcontrol.js

Node.js take 80-90% cpu when i move on heimcontrol and it laggy ~10k ms

Opened this issue · 3 comments

GET / 200 10095ms - 3.76kb!
GET /login 200 7386ms - 2.58kb
Its everytime i click any link on heimcontrol

Arduino is connected
Logs here:

pi@raspberrypi ~/heimcontrol.js $ node heimcontrol.js
WARNING: Change secret string in config/development.json
info - socket.io started
connect.multipart() will be removed in connect 3.0
visit https://github.com/senchalabs/connect/wiki/Connect-3.0 for alternatives
connect.limit() will be removed in connect 3.0
heimcontrol.js listening on port 8080
[WARNING] error while trying to connect to Arduino:

Could not establish Serial connection to Arduino.
[INFO] continuing and hoping for the best...
GET / 302 428ms - 68b
GET /login 200 7386ms - 2.58kb
GET /css/bootstrap.min.css 304 147ms
GET /css/bootstrap-responsive.min.css 304 136ms
GET /css/font-awesome.min.css 304 89ms
GET /css/heimcontrol.css 304 72ms
GET /js/require-jquery.js 304 83ms
GET /css/plugins.css 304 208ms
GET /heimcontrol.ico 304 25ms
GET /js/main.js 304 21ms
GET /js/bootstrap.min.js 304 87ms
POST /login 302 223ms - 58b
GET / 200 10095ms - 3.76kb
GET /css/bootstrap-responsive.min.css 200 351ms - 16.45kb
GET /css/font-awesome.min.css 200 358ms - 15.36kb
GET /css/heimcontrol.css 200 347ms - 1.42kb
GET /css/bootstrap.min.css 200 467ms - 103.46kb
GET /css/plugins.css 200 459ms - 853b
GET /js/require-jquery.js 200 623ms - 340.39kb
GET /font/fontawesome-webfont.woff?v=3.0.1 304 35ms
GET /js/main.js 304 22ms
GET /js/bootstrap.min.js 304 61ms
GET /js/plugins.js 304 84ms
GET /js/delivery.js 304 90ms
GET /js/raphael.js 304 82ms
GET /js/colourwheel.js 304 66ms
GET /js/jquery.cookie.js 304 56ms

Yes, I have the same issue. It doesn’t bother me much because the websocket communication (i.e., the buttons) are pretty much instantaneous. But yes, something’s off, 5+ seconds is way too long.

Thanks for reply! Thing is i have sometimes +11 seconds and its getting me furious.
Does anyone know why this happens? I have rasp pi b+

No idea, no. A crude idea would be simply inserting a bunch of console.log(Date.now())s in all relevant functions.