1

After some searching, I haven't been able to diagnose whether this is a typical response or not.

After a fresh install of Jessie lite, Node.JS 5.5.0 from node's latest dist for arm and express, set up nginx for serving my static content and be my proxy for nginx. Nginx currently serves the favicon, any of the smaller images (will use photo hosting site eventually for larger images), stylesheets and scripts. I have node running with express to generate html from jade and jade-bootstrap mix-ins.

Right when visiting the site locally (haven't exposed my server yet), I get a 10 second waiting period before the server responds. I've also noticed it takes a few seconds for Node to start running when I do start the server. Is there any suggestions on how to fix this, or is this to be expected with node on the RPi?

Edit: Before I had nginx handle my static files, my response time was 25 seconds

4
  • What model of Pi are you running on?
    – goobering
    Commented Jan 28, 2016 at 13:55
  • A few seconds for node to load might be understandable (I haven't used it on the pi) but a 10s delay in responses seems ridiculous -- I doubt that is "to be expected".
    – goldilocks
    Commented Jan 28, 2016 at 17:12
  • It's RPi Model B. I'm not too concerned about the couple seconds to launch. Mainly just the webpage delay.
    – frdmrckr
    Commented Jan 29, 2016 at 14:27
  • I am experiencing the very same slowness on my Model B. I am rendering the pages using jade. Been wondering if that is the cpu hog on the RPi. I have no graphics and really very little content but waiting ten seconds seems normal, but not acceptable. Oh! I just read the answer. Ok then. As my pages are so simple I wonder about just using straight HTML, no rendering engine. Anyone? Might Jade be the intermediary that is slowing things down so much?
    – Ric
    Commented Feb 13, 2016 at 22:05

1 Answer 1

1

After much debugging, it appears it was the fact I was using jade. It proved to be very resource intensive. I have since switched to ejs and greatly improved response time.

2
  • I have not used ejs before. Is it an easy switch from Jade?
    – Ric
    Commented Feb 13, 2016 at 22:08
  • ejs has much more straight forward html, so it was essentially rewriting my code from the simpler jade form to standard html, with the appropriate ejs javascript thrown in where I intended
    – frdmrckr
    Commented Feb 14, 2016 at 23:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.