1

I have a pretty simple Vuejs application that is hosted under NGINX. My hardware is Raspberry Pi 3B+ (OS: Raspbian).

Every time I go to my application from any device in my network (Windows computer, Android, IOS), the initial load time is extremely long. If I would have started a stopwatch when I made the initial browser request (from Chrome in all cases), and stopped it when the application had finished loading, I would reach approximately 7 s.

My Vuejs application has a chunk-vendors.js.map-file (~5.4 MB) which seems to be the "heaviest" thing here (according to performance tab in Chrome), I'm not sure.

But! If I for example request the application from my Windows computer, wait a few seconds, and then request the application from my Android device (or the opposite: start with a request from Android device, wait a few seconds, and then request the application from my computer), the loading time for last device is very short!

Question:

All of this makes me believe that something is in idle state? Does NGINX ever go into sleep mode (or something like it)?

  • What kind of persistent storage is your raspbian running from? – Seth May 22 at 8:05
  • It is a 32 GB SanDisk SD card. Free space, approx 70 %. – Hauns TM May 22 at 8:47
  • What's the class of the card? Maybe the loading speed is just slow and your example would indicate the file is being kept in RAM so successive requests are fast until it's unloaded. – Seth May 22 at 9:22
  • It's a Sandisk Ultra Micro-SD-card 32 GB. From what I understand the class is Application Performance Class A1. Is it really possible that this could affect my application that much? It's by no means a complicated application with heavy disc I/O? – Hauns TM May 22 at 11:10
  • 1
    Depending on file organization, health of the card and reader and so on it might have an impact. The A1 defines IOPS but not the actual class of a card. If you deem 7s a long time, taking half a second/a second to load a file from disk would be a long time. It's unkown what other files your site is loading or what it might be doing in terms of computation. If you do have faster access on successive hits caching and what kind of caching is happening would be something to look into. The initial delay might be because resources need to be loaded. – Seth May 22 at 12:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.