I have a local site running Magento 2 Enterprise set up on a Hyper-V virtual machine running Ubuntu 18.04 and Nginx. I've got 4 CPUs and plenty of RAM assigned to the virtual machine.
This same site is running quickly on a remote hosting server, even though the hosting server I'm signed up for is one of the lowest tier services (so it doesn't have a huge amount of resources). Yet the site still runs quickly.
When I'm running this site locally, requirejs takes an unreasonably long time (10+ minutes) to load the JavaScript for a page. Here's an example of how long it's taking to load small JavaScript files. Everything that's being loaded is core Magento (no custom stuff) and most of the JavaScript files are 1-2 KB, with some being under 1 KB. The largest one was 34 KB. I'm using the default Luma theme.
What could be causing these files to load so slowly? Each JavaScript file is tiny, so there's no reason why the page should be hanging for several minutes or more while Magento loads JavaScript files. What could be causing this?
I'm doing development so I don't want to turn on the merge JavaScript option while I'm still in development mode.
config
cache, and I originally mistook that with thecompiled_config
cache, which I did have enabled. When I realized my mistake and enabled theconfig
cache, the problem appears to have gone away. I don't understand why, but now my pages load within a few seconds, instead of the 10+ minutes it was taking before. – Ben Rubin Jun 24 '19 at 18:56